Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

IndexError: index 120 is out of bounds for axis 0 with size 120 #1

Description

@Lucas-C

Hi!

I tried your very promising app with the following couple of pictures:
bloodsplat
heart

I defined 10 control points, clicked Morph! and got the following stacktrace in the flask app logs:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "../lib/libmorphing/morphing.py", line 205, in _process_func
    frame = self._compute_frame(triangulation, t, shape, source_img, target_img, source_points, target_points)
  File "../lib/libmorphing/morphing.py", line 199, in _compute_frame
    source_val = source_img[int(source_point[1]), int(source_point[0]), c]
IndexError: index 120 is out of bounds for axis 0 with size 120
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/mnt/c/DevHome/tools/cygwin/opt/image-morphing/web/webmorphing/home.py", line 226, in thread_func
    ImageMorph(source_img_path, middle_img_path, target_img_path, source_points, middle_points, target_points,
  File "../lib/libmorphing/morphing.py", line 80, in __init__
    self._morph()
  File "../lib/libmorphing/morphing.py", line 139, in _morph
    res.get(timeout=None)
  File "/usr/local/lib/python3.8/multiprocessing/pool.py", line 771, in get
    raise self._value
IndexError: index 120 is out of bounds for axis 0 with size 120

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions