Hey, How to remove green color from an image?

28 ビュー (過去 30 日間)
Pramod Devireddy
Pramod Devireddy 2015 年 3 月 18 日
コメント済み: Pramod Devireddy 2015 年 3 月 19 日
Hey, How to remove green color from an image?

採用された回答

Image Analyst
Image Analyst 2015 年 3 月 18 日
There are several ways to do it depending on how you define green. See my File Exchange for three color segmentation tutorials. One that does it in RGB color space, one that does it in HSV color space, and one that does it based on the Delta E color difference metric.
Change the tutorials to get green rather than whatever the color the demo gets. It's just a matter of changing some threshold values. You don't need to change anything with the Delta E method since it does it based on some area that you draw in the image rather than on some absolute color values.
  1 件のコメント
Pramod Devireddy
Pramod Devireddy 2015 年 3 月 19 日
Your 'simple color detection' code helped me... Thanks.

サインインしてコメントする。

その他の回答 (2 件)

Christiaan
Christiaan 2015 年 3 月 18 日
Dear Pramod,
You can have a look at the Image color filtering in the File Exchange. With this function you can delete a certain colour range.
Just as background information, to understand how the calculation in MATLAB works: when you load a figure in Matlab, an array will be shown in the workspace (i.e. 400x400x3) At each pixel, the colour of that layer is defined (in rgb). If you for example convert it to grayscale with the function rgb2gray it will result in a 400x400 array since you only need one value at that pixel. (how black-white the pixel is).
Good luck! Christiaan

Image Analyst
Image Analyst 2015 年 3 月 18 日
See my demo for finding and tracking a green sharpie in the video.

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by