Open nmajid2 opened 3 years ago
Hi!
It will be difficult for me to test this out for you since I no longer have access to matlab. Probably I should also upload some python version of this if I will find time, since it is difficult to debug this without the proper tools...
Have you checked the size of the downward camera's images? maybe they are not 128 px long?
Hi,
I realized the error also happens for forward_camera. The way to reproduce the error is to change chosen_tracks(2).track = [2]
to chosen_tracks(2).track = [7]
in the edgeflow_generate_results.m.
After debugging more of the code, it sounds that the problem is here:
SAD_temp(r+D+1)=sum(abs(hist_previous(x-W+pixel_shift:x+W+pixel_shift)-hist_current(x+r-W:x+r+W)));
Sometimes the value of x+W+pixel_shift
goes above 131
, some other times the values of x-W+pixel_shift
become -12
and maybe less. So the root of the issue might be the calculation of pixel_shift
, because its values based on my observation become a negative number like -28
. The boundaries for hist_previous
and hist_current
are [1,128]
.
I checked the size of the images, they all have the same size, 256 X 96 pixels.
hmmm that could be but I haven't see this happen before, and it should be limiters in the code to handle this.
I will try to get my hands on a PC with matlab again but this will take some time. In the mean time you can double check those limits that are on there and maybe arrange something for that. However considering my inability to help out I might consider to rewrite everything in python instead in the future.
Thanks a lot, having the code in python would be very helpful. I can also check later to see whether I can use the Matlab Coder to convert the code into c/c++. And then python binding technologies can be used to access the library from python. For now, as you suggested, I keep debugging the Matlab code, since fixing the error in Matlab is easier than in c/c++.
Hello, I've just tried the code and it works with no error based on the default settings. However, when I changed the code in Edgeflow_prepare_data.m and replace the 'forward_camera' with 'downward_camera' and got the following error:
I try to fix the issue, but in case you have the solution in mind I appreciate your help. Thank you very much.