Can anyone help me with watermelon detection(image processing)?

I have to work with the texture of watermelon but i don't know the procedures how to use texture of watermelon to detect watermelon from an image and what functions should i use.Help me out with this.

 채택된 답변

Image Analyst
Image Analyst 2017년 8월 14일

0 개 추천

Could be anything. stdfilt() is a commonly used texture detection function. You might also use SURF, Hu's moments, Hausdorf distance, CBIR methods, or any number of other things.
Usually people show us an image when they ask for image processing advice.

댓글 수: 2

Here a sample image containing watermelon is given.If i want to detect watermelon from this image what steps should i take.I have used imcontour function to to get the contours first but its not working properly.First I filtered the image with this...
I = imread('watermelon.jpg');
A = I;
[r c z] = size(A);
for i= 1:r
for j = 1:c
if(2*A(i,j,2)<=(A(i,j,1)+A(i,j,3)))
A(i,j,1)=0; A(i,j,2)=0; A(i,j,3)=0;
elseif(2*A(i,j,2)>=(A(i,j,1)+A(i,j,3)+255))
A(i,j,1)=255; A(i,j,2)=255; A(i,j,3)=255;
else
A(i,j,1)=(2*A(i,j,2))-A(i,j,1)-A(i,j,3); A(i,j,2)=(2*A(i,j,2))-A(i,j,1)-A(i,j,3); A(i,j,3)=(2*A(i,j,2))-A(i,j,1)-A(i,j,3);
end
end
end
B = A(:,:,2);
%//then i get the gray image..
level = graythresh(B);
display(level);
BW =imbinarize(B, level);
imshow(BW);
%//finally the contour..
figure;
imcontour(BW);
output jpg is given at the attachment.How to solve it.I want to get the contours containing the watermelons.
That won't work. I think that because of all the edges and different patterns and different yet similar green colors you're going to need something like convolutional neural networks.

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

추가 답변 (0개)

질문:

2017년 8월 14일

댓글:

2017년 8월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by