How do I compare a sample pocket image with test images to test for sizing errors?

조회 수: 1 (최근 30일)
I am a newbie to matlab and image processing in general however my sister asked for me to biuld a project for her.
The project goes as follows
Given an image of a samples of the pocket design from a distance x, determine the size estimation of the sample pocket as well as compare them to the size estimations of all test images in the test set taken from the same distance x.
I was think If could detect the edges of the pocket and then somehow compute a pentagone from the picture and compute its size and compare it to all other pictures than I could test how much difference there is to determine the error.
I have also heard about sementic segmentation using nerual networks and am wondering if that would be a better option than this.
Regardless, I am student and am fully aware that this project is above my level but I still don't wish to let my sister down.
Any help would seriously be appreciated.
sample image:
image to test:

채택된 답변

Image Analyst
Image Analyst 2022년 7월 31일
Some things to try
Turn it into gray scale or use the red image
[r, g, b] = imsplit(rgbImage);
whichever one has more contrast.
then try imgradient, a canny filter, stdfilt, and adapthisteq. Then whichever one is best, threshold it. Might have to call bwconvhull and then bwareafilt. You might be able to get a big pocket-shaped blob from doing all that. You can certainly try SegNet but you'd need probably at least 50 images to train it on. With traditional image analysis algorithms you don't need any, or just the 3 or 4 you use during algorithm development.
If you need anymore help, attach the image it's not working on along with your code.
  댓글 수: 2
Syed Mohammad Abuzar
Syed Mohammad Abuzar 2022년 8월 7일
But how do I find the area of the blobs and compare them?
Image Analyst
Image Analyst 2022년 8월 7일
That would be regionprops. See my Image Segmentation Tutorial for a full demo.
props = regionprops(binaryImage, 'Area');
allAreas = [props.Area]

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deep Learning for Image Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by