필터 지우기
필터 지우기

How can I identify a particular shape at all degrees, while ignoring the rest?

조회 수: 2 (최근 30일)
Hello, I have an image of various lines and blobs, and I want my image to only show the lines. To accomplish this, I have utilized watershed, regionprops, ismember, and a few other methods in order to get to the image I am now. At this point, I can't reduce the area boundries, as I'll start losing lines before I lose the blobs, and solidity wouldn't accomplish anything as all of the shapes appear to have the same solidity (probably due to how the shapes were generated.) What options do I have left? Thanks in advance!
  댓글 수: 2
Florian Morsch
Florian Morsch 2018년 6월 14일
You could try to use SURF features, but if the object you want to identify is the long line-wise one then you will have a really hard time.
Kimo Kalip
Kimo Kalip 2018년 6월 14일
Yeah, I have thousands of those longer lines at various angles (So unfortunately there is no uniform orientation). The idea is to reduce the image to the point where only those white lines remain, and all extraneous noise is weeded out - but I'm wondering if I've hit a wall. Thanks for the idea though!

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2018년 6월 14일
Try the ratio of the majoraxislength to minoraxisLength.
  댓글 수: 11
Kimo Kalip
Kimo Kalip 2018년 6월 18일
So I have successfully filtered out large unwanted aspect ratios from my image, but in this variant I have several that have an aspect ratio of around 1. The problem is, this little pixel I'm zoomed in here also has a aspect ratio of 1 (I think, having a hard time verifying, but I think its a reasonable assumption).
Is there a way to get bwconncomp() to have a minimum and maximum "object" size before you run it? The way I've been doing it so far is filtering out the image prior, but if there is a way to teach the program what is and isn't a reasonable and regular size, it may be easier.
Image Analyst
Image Analyst 2018년 6월 18일
You can use bwareafilt() if you want instead.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Image Analyst
Image Analyst 2018년 6월 18일
You might enjoy learning about Hu's moments: http://www.youtube.com/watch?v=Nc06tlZAv_Q
  댓글 수: 1
Kimo Kalip
Kimo Kalip 2018년 6월 20일
Pretty close more or less to what I'm trying to achieve. Does he upload a reference photo for each logo at the start there though? In my case, the idea is that there are thousands of relatively similar shaped boxes rotated around a circle, the image is grayscale, and they usually the darkest thing on the image (Although not always, which is another thing I need to account for). What I'm getting at is: in many cases I won't have a reference to provide, other than the other objects in the image - does this still work? Also, the mms function he uses to determine the moments was something he wrote himself, and not provided by matlab? Thanks for the video though! End result was pretty cool

댓글을 달려면 로그인하십시오.

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by