autonomousvision / unimatch

[TPAMI'23] Unifying Flow, Stereo and Depth Estimation
https://haofeixu.github.io/unimatch/
MIT License
980 stars 102 forks source link

Why the value of optical flow is opposite? #39

Closed CJCHEN1230 closed 9 months ago

CJCHEN1230 commented 9 months ago

Thanks for your amazing work! For testing optical flow result, I input a pair of left/right image and split the x and y flow. x flow result x

y flow result y

I think the x flow should be like disparity, so the y flow is unclear really make sense. But why the value in close region is smaller than the far region in x flow image. Do I misunderstand something?

PS: The purpose of doing this is to make my own dataset for training a model for relative depth map. I think the opticalflow is the best performance.

CJCHEN1230 commented 9 months ago

I just realize my mistake. I normalize the image by (value-min)/(max-min). But the the image is left image, which means the offset should be negative. If I normalize the negative value with above formula. That would cause the value of close region smaller than far.