-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I wondered if there is a bug in the cpp version #1
Comments
Thanks a lot for your interest in my work.
You're completely right, thanks a lot for noticing it and reporting it to me. I've fixed it and committed it to the GitHub.
It's not necessary to pass a vector as a reference. Changes on a vector are reflected regardless. You can try this by printing values of rfresponse before and after calling SurroundModulation function.
I'll look into more details of this, in theory the OpenMP shouldn't corrupt the results because parallel processing is completely on independent variables. I think there must be some bug somewhere that I've missed. I'll try to figure it out. I just wanted also to mention to you that results in Matlab has non maximum suppression and c++ I haven't implemented it. But I guess you're already aware of that based on the pictures you've posted. Thanks a lot again, I highly appreciated your comments. And if you found any other problems please let me know. |
I very appreciate the help of your research for me. But when I read your cpp version code, I found some weird things.
In the sed.cpp file and the line 201, you defined a Mat clim. Then you use filter2D and resize it. But when you compute the responses of different orientations, you still use the Mat cim. That means the result of different scale clim never be used and the far surround in your cpp may be ignored.
I edit the line 215 to 224 as:
Then the result of the cpp version has some weird differences compare to matlab version.
The left image is the result of matlab version and right is the result of cpp version.
Another problem is in the line 75, the definition of the function SurroundModulation:
As far as I am concerned, you want to update the rfrespons in the function's parameter.
I think there may need a & in the definition of the function like:
void SurroundModulation (const cv::Mat InputImage, std::vector<cv::Mat>& rfresponse, const double GaussianSize,const double sigma )
Thank you very much for this excellent work.
Update:
But maybe this is because of the parallel of OpenMP. When I close OpenMP the result looks nearly the same as matlab now. But the lines in the matlab's result looks more straight.
The text was updated successfully, but these errors were encountered: