localdevices / pyorc

Surface velocity, object tracking, and river flow measurements in an open-source API
GNU Affero General Public License v3.0
129 stars 31 forks source link

When “Extracting grayscale images”, the values of the y-axis are reversed #168

Closed moroth89 closed 1 month ago

moroth89 commented 1 month ago

hi, I have the following problem: When I execute the command: da[0].frames.plot(cmap=“gray”, ax=ax) the direction of the y-axis is reversed (see images below). ARRC_stabilized-area ARRC_grey Is it possible that there is a bug?

I have attached the video and the case file here. https://gigamove.rwth-aachen.de/de/download/ffb0e0c743ad1785a07901934411e53f

Thanks a lot in advance.

Best, Moritz


How did you install pyopenrivercam (mamba / conda or pip)

[mamba]

What is the problem?

[When “Extracting grayscale images”, the values of the y-axis are reversed]

How can we reproduce this? (What steps trigger the problem? What parameters are you using for processing? Include screenshots. If you are having issues processing a video, if possible include a copy of your dataset uploaded on Dropbox, Google Drive, or other)

[Type answer here]

hcwinsemius commented 1 month ago

Hello @moroth89 . This is by design. The control point coordinates are stored in the original row and column coordinates of the frames which are descending order for the row-coordinates. The frames module only uses ascending coordinate axes whether dealing with unprotected frames, or projected frames. Hence to combine the camera config coordinates with a plot with frames you can simply use the normal matplotlib.pyplot.imshow function to plot a single frame, and then add the camera config on the same axis.

moroth89 commented 1 month ago

Yes, that's exactly how I came up with a solution. Thank you for your answer anyway. Problem solved.