フィルターのクリア

how to crop an image id-card only ..?

2 ビュー (過去 30 日間)
Malta
Malta 2013 年 11 月 11 日
コメント済み: Walter Roberson 2013 年 11 月 12 日
how to crop an image id-card only ..? using regionprops.
  1 件のコメント
Malta
Malta 2013 年 11 月 11 日
help me....!!

サインインしてコメントする。

回答 (2 件)

Walter Roberson
Walter Roberson 2013 年 11 月 11 日
First you threshold based on brightness. regionprops() and look for the one with the largest Area. Fill the inside of the pixel boundaries for that. The result will be a mask that you can use to extract the ID card from the color image.
  5 件のコメント
Image Analyst
Image Analyst 2013 年 11 月 12 日
If by fixed you mean always in the same location, it does not matter. regionprops() will find the blobs in the binary or labeled image regardless of where they are locataed in the image, or how they are oriented.
Walter Roberson
Walter Roberson 2013 年 11 月 12 日
And also regardless of if they are a constant size.
What you do need to worry about is the thresholding method, if they can be different colors. You are, for example, likely to have problems with a pure black ID-card that lights up in black with black letters.

サインインしてコメントする。


Image Analyst
Image Analyst 2013 年 11 月 11 日
Get a monochrome image, for example by looking for white, if the cards are always white. Then threshold and find the largest white blob. This is done in my Image Segmentation Tutorial: http://www.mathworks.com/matlabcentral/fileexchange/25157-image-segmentation-tutorial-blobsdemo
If you want to get a perfect rectangle from the blob, get the filled object and then use http://www.mathworks.com/matlabcentral/fileexchange/34767-a-suite-of-minimal-bounding-objects

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by