Issue in recognising multiple objects in an Image

조회 수: 2 (최근 30일)
Rohan Gupta
Rohan Gupta 2017년 1월 21일
댓글: william pyae 2018년 5월 26일
I have images of Apples as well as of Oranges, which I am using as training images. The test image is an image consisting of both apple and orange. I am using GIST descriptor for feature extraction. When I train the classifier using extracted features, it gives an output as apple or orange for the test image. I have a query, as how can I make classifier recognise both of them in the test image. I am using KNN classifier
  댓글 수: 4
Rohan Gupta
Rohan Gupta 2017년 1월 25일
It would be really helpful if someone would help me out with this problem. I would like to know if my approach is correct or not.
william  pyae
william pyae 2018년 5월 26일
Hi Rohan, I'm doing a similar project as yours. Could you able to post all your matlab code in the file exchange? I would like to take references from your project. Thank you so much.

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

채택된 답변

Image Analyst
Image Analyst 2017년 1월 25일
Why not simply look at the color? Just convert to HSV color space, mask out the background and look at the amount of orange in the image. If there's more orange than non-orange, it's an orange.
  댓글 수: 3
Image Analyst
Image Analyst 2017년 1월 27일
regionprops() will tell you the hue of every single region in the image. Once you've made a determination, you can assign a string with the name of the fruit. Like
props = regionprops(binaryImage, hueImage, 'MeanIntensity');
for k = 1 : length(props)
thisHue = props(k).MeanIntensity
if thisHue < 0.1 % or whatever
fruitType{k} = 'Apple'
fruitType{k} = 'Orange'
Rohan Gupta
Rohan Gupta 2017년 1월 28일
Thank-You Sir, it works

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

추가 답변 (1개)

Takuji Fukumoto
Takuji Fukumoto 2017년 1월 25일
I think you should cut block from a whole image and slide it for recognition if you want to use that classification.
  댓글 수: 3
Takuji Fukumoto
Takuji Fukumoto 2017년 1월 25일
편집: Takuji Fukumoto 2017년 1월 25일
I mean it can work if you create 'search window'. The search window is used in some detector algorithm.
RCNN find something like object first and then use classifier.
Rohan Gupta
Rohan Gupta 2017년 1월 27일
I am not suppose to use RCNN or CNN for this application. Is there any other way. By the way thank you for your valuable inputs. It would be really helpful, if you could help me out further.
The single test image will have 3 or 4 fruits, How can I detect all of them?
Features of each fruits can be extracted using color as it's feature (during training), but when I train KNN classifier and give it a test image, it will give only one output (i.e orange or apple). It won't tell me the names of all the fruits present in the image.

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


Help CenterFile Exchange에서 Image Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by