Image comparison with respect to edges - 2

3 vues (au cours des 30 derniers jours)
Can Acar
Can Acar le 5 Juil 2011
I want to compare two pictures with respect to edges.
I have a slit that moves over lens and camera takes pictures for each step on lens.
To detection of starting point of lens, i want to take pictures continuously and use edge detection to compare with old picture until having a picture with edges.
At my last question, i mentioned, the first picture is full of dark. But after many tries, I saw that sometimes some noises can occur. Without using any filter to delete these noises and so without using the command "any()", How can i compare and tell to program if a picture occurs?

Réponse acceptée

Ashish Uthama
Ashish Uthama le 6 Juil 2011
This is my interpretation of your question:"How do I find the first valid image which has a slit in it? I cant use any because there could be some noise".
How about sum instead? If the sum of all pixel values is above a certain threshold you could assume that a valid slit was captured.
You could also try variations like using the number of pixels above a threshold value as a trigger condition. [Sean de]'s code and explanation:
Npx_bright = sum(I(:)>80)
The '>' makes every pixel with an intensity larger than 80 one and everything else zero; the (:) turns it into a column vector for summing the 'sum()' adds up all of the ones.
  3 commentaires
Sean de Wolski
Sean de Wolski le 6 Juil 2011
Npx_bright = sum(I(:)>80)
the '>' makes every pixel with an intensity larger than 80 one and everything else zero; the (:) turns it into a column vector for summing
the 'sum()' adds up all of the ones.
Can Acar
Can Acar le 7 Juil 2011
Thank you very much!!! It works perfectly!!!

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by