From: Suchita on
Hey,

I tried to color the selected part of the image with blue. I selected the image part using roipoly. Now if i have to color that part of the image, Can I be able to do that??? If yes, how to do that ?
From: ImageAnalyst on
On Sep 5, 11:26 pm, "Suchita " <suchitamanand...(a)hotmail.com> wrote:
> Hey,
>
> I tried to color the selected part of the image with blue. I selected the image part using roipoly. Now if i have to color that part of the image, Can I be able to do that??? If yes, how to do that ?

----------------------------------------------------
Is it a color image or monochrome? Do you just want a solid uniform
blue? Or do you want to keep the original intensity of the image but
just give it a blue tint?
From: Suchita on
It would be great if we can keep the original intensity of the image and just give the slight color. But how to do that ?


mageAnalyst <imageanalyst(a)mailinator.com> wrote in message <89fd39e1-9f5e-49c7-83f7-7e0c82c15467(a)m11g2000yqf.googlegroups.com>...
> On Sep 5, 11:26?pm, "Suchita " <suchitamanand...(a)hotmail.com> wrote:
> > Hey,
> >
> > I tried to color the selected part of the image with blue. I selected the image part using roipoly. Now if i have to color that part of the image, Can I be able to do that??? If yes, how to do that ?
>
> ----------------------------------------------------
> Is it a color image or monochrome? Do you just want a solid uniform
> blue? Or do you want to keep the original intensity of the image but
> just give it a blue tint?
From: Image Analyst on
"Suchita " <suchitamanandhar(a)hotmail.com> wrote in message <h81rdh$ki$1(a)fred.mathworks.com>...
> It would be great if we can keep the original intensity of the image and just give the slight color. But how to do that ?
>
>-----------------------------------------------------------------------------------
Suchita:
This will do that.
Good luck,
ImageAnalyst

% Demo macro to tint the user drawn area blue.
% by ImageAnalyst
% function test
clc;
close all;
% clear all;
workspace;
% Read in a standard MATLAB test image.
rgbImage = imread('peppers.png') ;
% Display it.
subplot(1,3,1);
imshow(rgbImage);
set(gcf, 'Position', get(0, 'ScreenSize')); % Maximize figure.
% Ask user to draw a region.
uiwait(msgbox('Left click several points and then right click to finish'));
% Get the region as a mask.
[mask x y] = roipolyold;
subplot(1,3,2);
imshow(mask, []);
% Convert to HSV space. Get HSV version of the RGB image.
hsv_image = rgb2hsv(rgbImage);
hueImage = hsv_image(:,:,1);
% Tint the region inside where the user drew to be blue.
hueImage(mask>0) = .7;
hsv_image(:,:,1) = hueImage;
% Convert back to rgb space, and display.
tintedRGBImage = hsv2rgb(hsv_image);
subplot(1,3,3);
imshow(tintedRGBImage);
From: Suchita on
Hey,

This code is not working. I mean it is giving just the binary image. But my need is to change the color of the selected part of the image like say blue and the rest of the unselected part as it is..How to get that ??

"Image Analyst" <imageanalyst(a)mailinator.com> wrote in message <h81uk1$m1f$1(a)fred.mathworks.com>...
> "Suchita " <suchitamanandhar(a)hotmail.com> wrote in message <h81rdh$ki$1(a)fred.mathworks.com>...
> > It would be great if we can keep the original intensity of the image and just give the slight color. But how to do that ?
> >
> >-----------------------------------------------------------------------------------
> Suchita:
> This will do that.
> Good luck,
> ImageAnalyst
>
> % Demo macro to tint the user drawn area blue.
> % by ImageAnalyst
> % function test
> clc;
> close all;
> % clear all;
> workspace;
> % Read in a standard MATLAB test image.
> rgbImage = imread('peppers.png') ;
> % Display it.
> subplot(1,3,1);
> imshow(rgbImage);
> set(gcf, 'Position', get(0, 'ScreenSize')); % Maximize figure.
> % Ask user to draw a region.
> uiwait(msgbox('Left click several points and then right click to finish'));
> % Get the region as a mask.
> [mask x y] = roipolyold;
> subplot(1,3,2);
> imshow(mask, []);
> % Convert to HSV space. Get HSV version of the RGB image.
> hsv_image = rgb2hsv(rgbImage);
> hueImage = hsv_image(:,:,1);
> % Tint the region inside where the user drew to be blue.
> hueImage(mask>0) = .7;
> hsv_image(:,:,1) = hueImage;
> % Convert back to rgb space, and display.
> tintedRGBImage = hsv2rgb(hsv_image);
> subplot(1,3,3);
> imshow(tintedRGBImage);
 |  Next  |  Last
Pages: 1 2 3
Prev: GUI, pushbutton, callback
Next: BPSK demodulator