필터 지우기
필터 지우기

How to detect objects in an image based on colour?

조회 수: 1 (최근 30일)
Faraz
Faraz 2015년 6월 7일
댓글: Amith Kamath 2015년 6월 10일
I am using a handwriting database for writer recognition. I'm using the QUWI database, it has a sample of an original image and a sample of the image segmented into lines by giving each line a different colour.
For example here is the original image: (couldn't upload it here as it was over 5 MB)
And here is the image where the lines are detected and separated via colour:
Is there anyway I can use the method they used to extract the lines from the original image based on colour. Such as using the colours of this image as a mask?

채택된 답변

Image Analyst
Image Analyst 2015년 6월 7일
I have a variety of color segmentation methods in my File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 Look at them.
It's a little more complicated if you don't know how many colors your graduate student used to write that. Perhaps he should have been an art student instead. Can you assume that you know how many different color pens he used? If so, you can use kmeans() (in the Statistics and Machine Learning Toolbox) to find the centroids of the different colors. You might feed it the LAB color channels and use the Delta E color difference metric to find all pixels in the image within a specified distance of each color centroid.
  댓글 수: 1
Amith Kamath
Amith Kamath 2015년 6월 10일
In addition to ImageAnayst's answer, you could also take a look at Using the Color Thresholder App documentation. This would be useful to select the colorspace that works the best for differentiating the text based on colors, and also to choose appropriate thresholds in that colorspace.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by