필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Create Sharp squares where there were filled with Imfill

조회 수: 1 (최근 30일)
Andrew Luce
Andrew Luce 2019년 7월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
I have barcode that I am creating via edge detect and imfill create the image below. Is there a way to convert the created rectangles into ones with nice sharp edges? I also wonder if its possible to correct the spacing. This is a Code-39 barcode so there is only small and large spacing that should be equivalent in size of the small and large bars present?
Thank you
Andrew
barcode edge detect.jpg
  댓글 수: 1
Julie
Julie 2019년 7월 4일
While you could do this, it will probably not be accurate enough to read as a barcode, you should try to clean up the image more before using edge detection.
If you still want to, I would locate the objects using bwpropfilt then use the positions as well as the major/minor axis to draw rectancles on a new blank image.

답변 (1개)

Image Analyst
Image Analyst 2019년 7월 4일
If you have the boundaries, use poly2mask().

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by