Applying the formula to determine the barcode
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to write the code to apply the formula to the image and the result is low-pass filtered. The red region is the highest intensity which corresponds to the barcode.
Formula:

Original Image

Processed Image

0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 25 Jan. 2012
Perhaps
[FX, FY] = gradient(YourImage);
abs(FX) - abs(FY)
It appears to me that if the image were rotated 90 degrees then the value for any one pixel would switch sign, so you may wish to search for largest absolute values rather than just largest values.
2 Kommentare
Walter Roberson
am 30 Jan. 2012
[maxval, maxloc] = max(abs(TheDiff(:)));
[maxr, maxc] = ind2sub(size(TheDiff), maxloc);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Computer Vision with Simulink finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!