Applying the formula to determine the barcode
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Walter Roberson
2012년 1월 25일
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
Walter Roberson
2012년 1월 30일
[maxval, maxloc] = max(abs(TheDiff(:)));
[maxr, maxc] = ind2sub(size(TheDiff), maxloc);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!