Azzera filtri
Azzera filtri

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 visualizzazione (ultimi 30 giorni)
the image is an RGB object image

Risposte (1)

Fei Deng
Fei Deng il 21 Set 2016
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;


Scopri di più su Images in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by