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

Window size & target resolution #154

Closed amirdastgheib closed 3 months ago

amirdastgheib commented 7 months ago

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

pip

What is the problem?

Hi I have a problem with selecting the optimal values for window_size and target resolution. My river width is around 50 m and the discharge is 130 (m3/s) so, the real flow velocity is around 2(m/s) in reality. I have used OpenRiverCam and I selected window_size = 70 with different target resolution = 0.05, 0.06, 0.07, 0.08 and for each target resolution the mean discharge (quantile 2) shows different value. and the same for changing window_size with fix target resolution. However, changing mean v_eff is not that much and is from 2.2 to 2.4. I am not sure which window_size and target resolution would be the optimum values for this river. Also, why when I changed the window_size and target resolution, discharge shows more fluctuations in comparison with v_eff??

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]

amirdastgheib commented 7 months ago

Window Size_ Resolution

amirdastgheib commented 7 months ago

Also I did it with another water level to see the difference: Window Size_ Resolution 2

amirdastgheib commented 7 months ago

As I said, the real discharge is 130 (m3/s) and according to our cross section the real velocity would be around 2 (m/s).

hcwinsemius commented 7 months ago

I went through your table. Looks like you did comprehensive investigating. A few remarks:

amirdastgheib commented 7 months ago

Thank you for your informative response. According to your last point: "we have a new (v0.5.3) project method that resolves issues with objectives that are partly outside the field of view which can cause errors in the reprojection. Try this out with frames.project(method="numpy") " I am a little bit confused. Indeed, I am not sure if I can do (frames.project(method="numpy")) in my current version (v0.5.2) or I need to first install new version (v0.5.3) and then do (frames.project(method="numpy"))?? And if so, how I can install v0.5.3?

amirdastgheib commented 7 months ago

And if I can do (frames.project(method="numpy")) with my current version (v0.5.2), I am not sure where should I put (frames.project(method="numpy")) to my code. Because in several lines we have (frames.project()) such as:

da_norm_proj = da_norm.frames.project() or

da_rgb_proj = da_rgb.frames.project() in (Analyze surface velocities of a video with velocimetry) or da_rgb_proj = da_rgb.frames.project() in ( Immersive plotting and analyzing results)??? I did not get where exactly I should put this : frames.project(method="numpy")!

hcwinsemius commented 7 months ago

In any line where you perform projection you can use method=numpy

Updating to the latest code with conda:

conda update pyopenrivercam

With pip:

pip install --upgrade pyopenrivercam