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

Problem with frame difference #79

Open
kasperkamperman opened this issue May 19, 2015 · 1 comment
Open

Problem with frame difference #79

kasperkamperman opened this issue May 19, 2015 · 1 comment

Comments

@kasperkamperman
Copy link

I try to do a simple frame difference. I know I can do it with Processing directly, however I wanted to try it with OpenCV (also because of threshold, flip and more functions).

I found that diff returns a difference even when you compare two the same images. I tried also the diff function that compares two OpenCV Mat objects, that works better.

Any idea if this is a bug, or I make a thinking mistake?

framedifference problem (special script to compare two the same images):
https://gist.github.com/kasperkamperman/b0a412d2a0a99f002856

difference found when comparing the same image

Mat version that works, however I have some problem with the toCV function and to create a new Mat:
https://gist.github.com/kasperkamperman/0605812c7fb35515ac6c

tocv function

I hope I post on the right place (was in doubt to post this in the comments of your blog or overhere).

Version info:
OpenCV for Processing 0.5.2 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
Processing 3.0a4

@jorditost
Copy link
Contributor

I experienced the same problem some weeks ago using the diff function (I didn't try it directly with the Mat).

Is there some reason / explanation?

On 19 May 2015, at 22:43, kasperkamperman [email protected] wrote:

I try to do a simple frame difference. I know I can do it with Processing directly, however I wanted to try it with OpenCV (also because of threshold, flip and more functions).

I found that diff returns a difference even when you compare two the same images. I tried also the diff function that compares two OpenCV Mat objects, that works better.

Any idea if this is a bug, or I make a thinking mistake?

framedifference problem (special script to compare two the same images):
https://gist.github.com/kasperkamperman/b0a412d2a0a99f002856

Mat version that works, however I have some problem with the toCV function and to create a new Mat:
https://gist.github.com/kasperkamperman/0605812c7fb35515ac6c

I hope I post on the right place (was in doubt to post this in the comments of your blog or overhere).

Version info:
OpenCV for Processing 0.5.2 by Greg Borenstein http://gregborenstein.com
Using Java OpenCV 2.4.5.0
Processing 3.0a4


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants