-
Notifications
You must be signed in to change notification settings - Fork 45
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
negative index in padded image? #4
Comments
I also have faced problem about |
In addition, WITHIN(affine_corners.atcv::Point2f(0) like this , it doesn't work. |
Hi |
For WITHIN(affine_corners...) I modified the code in such way in configsToAffine(): cv::Point2f point0, point1, point2, point3; if (WITHIN(point0, top_left, bottom_right) &&
} |
Hello, thank you for your answer, it really can run, but the speed is not particularly satisfactory, I am on the window10 i7 6 core 12 thread GTX1060 computer, it needs more time than matlab |
Excuse me, after you configure it, use the author's picture, how long does it run in Release? |
Hi there,
I didn't look at computation time as I Just wanted to test the algorithm but indeed it took long minutes for one image (maybe 15-20?) on a somewhat powerful laptop so I was a bit disapointed about thé 'fast' title... Might be a question of parameters space tuning though,
Hope it helps and I'm interested if you find à solution.
Best,
Sandrine
----- Mail d'origine -----
De: yangninghua <notifications@github.com>
À: subokita/FAsT-Match <FAsT-Match@noreply.github.com>
Cc: svoros <Sandrine.Voros@univ-grenoble-alpes.fr>, Author <author@noreply.github.com>
Envoyé: Fri, 02 Nov 2018 15:06:36 +0100 (CET)
Objet: Re: [subokita/FAsT-Match] negative index in padded image? (#4)
For WITHIN(affine_corners...) I modified the code in such way in configsToAffine():
cv::Point2f point0, point1, point2, point3;
point0.x = affine_corners.at(0, 0);
point0.y = affine_corners.at(0, 1);
point1.x = affine_corners.at(1, 0);
point1.y = affine_corners.at(1, 1);
point2.x = affine_corners.at(2, 0);
point2.y = affine_corners.at(2, 1);
point3.x = affine_corners.at(3, 0);
point3.y = affine_corners.at(3, 1);
if (WITHIN(point0, top_left, bottom_right) &&
WITHIN(point1, top_left, bottom_right) &&
WITHIN(point2, top_left, bottom_right) &&
WITHIN(point3, top_left, bottom_right)) {
```
affines[i] = affine;
insiders[i] = true;
```
}
Excuse me, after you configure it, use the author's picture, how long does it run in Release?
…--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#4 (comment)
|
Somehow I completely missed all the conversations. Second thing, since I didn't have access to CUDA, so I the only parallelization I did was to use Intel TBB, if you know some GPU computing, that should speed it up considerably. Remember, this is 4 years old code, advancement in GPU, Tensor Flow, etc, should mean that this can be optimized way faster. Also, avoid And for this |
Hello Saburo,
Thanks A LOT for your implementation ans for sharing it. My tweaks were just a 'quick fix' to make your code compile on more recent versions of opencv and probably slow things down. Anyways it allowed me to quickly test the method on my data so thanks again !
Best,
Sandrine
----- Mail d'origine -----
De: Saburo Okita <notifications@github.com>
À: subokita/FAsT-Match <FAsT-Match@noreply.github.com>
Cc: svoros <Sandrine.Voros@univ-grenoble-alpes.fr>, Author <author@noreply.github.com>
Envoyé: Sun, 04 Nov 2018 23:07:43 +0100 (CET)
Objet: Re: [subokita/FAsT-Match] negative index in padded image? (#4)
Somehow I completely missed all the conversations.
Anyway, I didn't come up with the name FAST, it was the original author of the code, at that point of time, for the thing it does (rotational invariance), it was fast.
Second thing, since I didn't have access to CUDA, so I the only parallelization I did was to use Intel TBB, if you know some GPU computing, that should speed it up considerably. Remember, this is 4 years old code, advancement in GPU, Tensor Flow, etc, should mean that this can be optimized way faster.
Also, avoid
` affine_corners.at(0, 0);`
deference it to pointer instead, if that code gets executed multiple times. Since `at(x,y)` redo the calculation (at least in the older OpenCV) to find the index.
And for this
`score += abs(vals_i1[j] - padded.at(target_y - 1, target_x - 1) );`
There should be a part where it does the padding, maybe I missed the X-axis part?
…--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#4 (comment)
|
Thank you for your answer, my laptop configuration is, CPU: i7-8750H, GPU: GTX1060, I configured it according to your method, running time Release is more than 300 seconds, thank you for your help and advice |
@subokita I can't find the tbb file when run the codes. #include <tbb/tbb.h> |
@subokita I meet the same issue, I can't find the tbb file when run the codes. |
Hi,
I've been trying to use your code on Windows 10 (vc++12, OpenCV 2.4.9).
I'm able to compile correctly but am facing some issues when running the code.
More precisely, when I'm in the function FAsTMatch::evaluateConfigs,
when the score is computed as
score += abs(vals_i1[j] - padded.at(target_y - 1, target_x - 1) );
I have negative values for target_x - 1, so the program crashes.
I'm running the tests with the image.png and template.png files you provided.
I have otherwise not changed the parameters you used in your main function to call the FAsTMatch, and have not changed the padding of the image either.
Would you have any insights on how to solve this issue?
Thanks
The text was updated successfully, but these errors were encountered: