Skip to content
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

different result in raspberry pi #15

Open
Sandesh4242 opened this issue Oct 17, 2019 · 11 comments
Open

different result in raspberry pi #15

Sandesh4242 opened this issue Oct 17, 2019 · 11 comments
Labels
wontfix This will not be worked on

Comments

@Sandesh4242
Copy link

I tried to run the code on raspberry pi, the value of score/len(matches) is different there.
when i run this code on anaconda3 the value is 46 but i receive 15 in raspberry pi.

PSA: all the python idle, libraries are same

@kjanko
Copy link
Owner

kjanko commented Oct 17, 2019

Can you do some backtracking and see which values differ?

@Sandesh4242
Copy link
Author

can you be more specific?

@kjanko
Copy link
Owner

kjanko commented Oct 17, 2019

Check the outputs of:

	kp1, des1 = get_descriptors(img1)
	kp2, des2 = get_descriptors(img2)
	matches = sorted(bf.match(des1, des2), key= lambda match:match.distance)

If the descriptors do not match, check these:

	harris_corners = cv2.cornerHarris(img, 3, 3, 0.04)
	harris_normalized = cv2.normalize(harris_corners, 0, 255, norm_type=cv2.NORM_MINMAX, dtype=cv2.CV_32FC1)

	keypoints.append(cv2.KeyPoint(y, x, 1))

@Sandesh4242
Copy link
Author

The outputs of
kp1, des1 = get_descriptors(img1)
kp2, des2 = get_descriptors(img2)
matches = sorted(bf.match(des1, des2), key= lambda match:match.distance)

is different.
i printed out the value of

harris_corners = cv2.cornerHarris(img, 3, 3, 0.04)
harris_normalized = cv2.normalize(harris_corners, 0, 255, norm_type=cv2.NORM_MINMAX,
dtype=cv2.CV_32FC1)

and its same for both cases.
i couldn't print keypoints.append.

@kjanko
Copy link
Owner

kjanko commented Oct 18, 2019

The outputs of
kp1, des1 = get_descriptors(img1)
kp2, des2 = get_descriptors(img2)
matches = sorted(bf.match(des1, des2), key= lambda match:match.distance)

is different.
i printed out the value of

harris_corners = cv2.cornerHarris(img, 3, 3, 0.04)
harris_normalized = cv2.normalize(harris_corners, 0, 255, norm_type=cv2.NORM_MINMAX,
dtype=cv2.CV_32FC1)

and its same for both cases.
i couldn't print keypoints.append.

Print the keypoints array after the loop that fills it ends. But since you're saying that the harris corners are detected in the same manner, I'm guessing that ORB behaves differently on embedded hardware. You'll most likely need to report this to OpenCV.

@Sandesh4242
Copy link
Author

Sandesh4242 commented Oct 18, 2019

i think the keypoints array are different. i have attached the outputs below.
this is obtained in pc
pc
this is obtained in raspberry pi 3b
pi1
pi2

@kjanko
Copy link
Owner

kjanko commented Oct 18, 2019

Are you sure the harris_normalized matrices are the same?

@Sandesh4242
Copy link
Author

sorry the snip were uploaded in different order, i have corrected it. Please do have a look.

PS: This will be issue for the maximum people now since it is not compatible with raspberry pi, we need to figure out the problem as soon as possbile

@kjanko
Copy link
Owner

kjanko commented Oct 18, 2019

The keypoints are the same. This means that the output of ORB is different on both platforms. I suggest opening an issue @ OpenCV.

@Sandesh4242
Copy link
Author

Can you open an issue and tag me too?

@kjanko
Copy link
Owner

kjanko commented Oct 18, 2019

Can you open an issue and tag me too?

No.

@kjanko kjanko added the wontfix This will not be worked on label Oct 19, 2019
Repository owner locked as resolved and limited conversation to collaborators Nov 6, 2019
Repository owner deleted a comment from DingtianX Nov 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants