how can i assign different intensity to an object present in an image with dimension (N,N,3) (for example: assigning different intensity(like 10,20,100,etc) to a circle present in an image)

1 回表示 (過去 30 日間)
HT
HT 2016 年 9 月 19 日
回答済み: Fei Deng 2016 年 9 月 21 日
the image is an RGB object image

回答 (1 件)

Fei Deng
Fei Deng 2016 年 9 月 21 日
Hi Hemang,
To assign a different intensity to an object present in an RGB image, basically there are two steps:
(1) To identify the object and positions of the pixels that this object sits on;
(2) Assign intensity to these pixels.
You can use Computer Vision System toolbox or Image Processing toolbox to do the first step, for example, function ‘imfindcircles’ can be used for finding circles. Now I assume you already have those target positions in hand. To change intensity of certain positions, here is a simple example:
I= imread('peppers.png'); % read an image (stored in MATLAB default path)
I2 = I;
I2(:,200:220,:)=255; % Change the intensity to 255 for the object, here the object is a vertical line with width 20;
image(I2)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by