Image/color manipulation formulas [closed] - image-manipulation

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I know how to do simple things with images at the pixel level like applying grayscale, sepia, etc. I'd like to find some articles on how to apply saturation, hue, brightness, contrast, etc at the pixel level, and I'm having trouble getting anything useful from my google searches.

Since pixels are usually represented as RGB (red, green, blue) values, it's often more useful to convert them to another color space to manipulate them, e.g. HSB (Hue, Saturation, Brightness) - that way you can change those values individually more easily.
If you search for RGB to HSB conversion you should find examples of how to do it (I think I found some useful code on Wikipedia).
Obviously after you've manipulated the pixels (e.g. multiplying the saturations by 0.2) you then have to convert them back to RGB for display.

Related

What type of color is this 0xfffbb448? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I am learning flutter in most of my UI tutorial they are using this type of color code
0xfffbb448
I need to know what type is it? Where I can find these color codes? Try to find on google but not able to find which type of color code is this.
The color code 0xFFfbb448 is how you define a hexadecimal color in flutter. It starts with 0x, then 2 digits that represents the opacity/transparency, and then the last 6 digits is the color code Hex #.
You can get the 6 digit color code # from many sources such as https://htmlcolorcodes.com/ or https://www.w3schools.com/colors/colors_picker.asp
You may also find the 2 digits transparency code from sources such as https://gist.github.com/lopspower/03fb1cc0ac9f32ef38f4
An example:
Colors.blue.withopacity(0.5) would be the same as Color(0x800000FF)
where 80 means 50% opacity, and #0000FF is Hex color code for blue
There are many sources out there and similar questions like the below link to find out more.
How do I use hexadecimal color strings in Flutter?

Determination of area of circular object in image [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to determine area of circular object in image below using MATLAB. Can someone explain codes for doing that? I got thresholded image but I did not proceed more.
If the binary image is img, and it contains only values 0 (background) and 1 (object), or it is a logical array containing true and false, and all the object pixels are considered part of the object, then sum(img(:)) is the area of the object in pixels.
If the segmented image contains multiple objects, or noise, it will have to be filtered first to leave only the pixels that belong to the one object.
To convert the area in pixels to an area in physical units you need to know the size of a pixel. This is often obtained by adding a ruler to the image.

How to change Matlab's scaling process when not Native? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I would like to change the downsampling method or the process by which Matlab changes picture when resolution is not native.
I am especially interested in the scaling methods which are suitable for scientific computing in grayscale.
Default Matlab 2016a's warning whatever the scaling is
Warning: Image is too big to fit on screen; displaying at 50%.
Either the scaling is 10^-6 or 1/2, my Matlab 2016a always says that it is 50%, which is irritating.
How can you change Matlab's downsampling method or corresponding scaling process?
When displaying an image you should use imshow.
In imshow you can set the zoom level.
Look at the ImshowInitialMagnification property of imshow.
For instant:
mInputImage = imread('cameraman.tif');
imshow(mInputImage, 'ImshowInitialMagnification', 100);

How to convert grayscale image to rgb with full colors? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I'm trying to convert a grayscale image to rgb image . I searched the net and found this code:
rgbImage = repmat(grayImage,[1 1 3]);
rgbImage = cat(3,grayImage,grayImage,grayImage);
but what this does is only give the image in gray-scale with 3-D matrix.
I want to have a way that i can convert it into true color image.
It's impossible to directly recover a colour image from the grey scale version of it. As correctly said by #Luis Mendo in the comments, the needed information are not physically stored there.
What you can do is try to come up with a mapping between intensity level and colour, then play around with interpolation. This however will not produce a good result, but just some colour mapping information that may be very far from what you want.
If you have another colour image and you want to fit its colours to your grey scale image, you may want to have a look at: http://blogs.mathworks.com/pick/2012/11/25/converting-images-from-grayscale-to-color/ .
In particular the function that is there cited can be found here: http://www.mathworks.com/matlabcentral/fileexchange/8214-gray-image-to-color-image-conversion#comments.
Bare in mind that this will be slow and will not produce a great result, however I don't think you can do much more.
yes it's impossible to directly convert gray scale image to rgb..but it is possible to add features or show something like an edge detected on gray scale image in rgb by adding it..if you want you can use this..
rgb = zeros([size(I_temp) 3]);
rgb(:,:,1) = im2double(rr);
rgb(:,:,2) = im2double(rg)+.05*double(I_temp) ;
rgb(:,:,3) = im2double(rb);
where rr,rg,rb are an rgb base image..

"I = [MxNx4]" meaning? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am doing an image processing project. In my project there is an GUI file that reads an image and processing it for segmentation. while reading an image file, initially it is checking the size of that image... However, I don't understand what the function I=[m x n x 4] really means. Could someone explain this to me?
Your image I is of size m pixels high by n pixels wide and has 4 channels: Red, Green, Blue and an alpha channel.
Matlab stores I as a 3D array, you can access the x-y-th pixel by I(y,x,:) returning the four-vector representing the RGBA value of the x-y-th pixel.