Questions tagged [grayscale]

For questions regarding Grayscale, a Bootstrap theme.

972 questions
12
votes
1 answer

Converting RGBA image to Grayscale Golang

I'm currently working on a program to convert and RGBA image to grayscale. I asked a question earlier and was directed to the following answer - Change color of a single pixel - Golang image Here is my original question - Program to convert RGBA to…
benjano
  • 369
  • 1
  • 5
  • 17
12
votes
1 answer

Image conversion to Grayscale using ImageMagick is very dark

I converted a bunch of "normal" JPG photos via convert infile -colorspace Gray outfile to monochrome. However the result is for all images very dark. Here a sample conversion: original photo and converted monochrome image. Is there a better way to…
halloleo
  • 9,216
  • 13
  • 64
  • 122
11
votes
1 answer

Set individual pixels in .NET Format16bppGrayScale image

I'm trying to render a small Bitmap in memory with .NET that needs to be 16 bit Grayscale. The bitmap's format is set to PixelFormat.Format16bppGrayScale. However, Bitmap.SetPixel takes a Color argument. Color in turn takes one byte for each of…
Eric J.
  • 147,927
  • 63
  • 340
  • 553
11
votes
4 answers

Conversion to grayscale using emguCV in C#

I am new to EmguCV. I want to convert an rgb image into gray scale. For the conversion I have used the code Image grayImage = ColordImage.Convert(); Now when i compile this code in C# it gives no error,but when i run it then…
Amal
  • 1,395
  • 3
  • 9
  • 9
11
votes
2 answers

How to convert a grayscale matrix to an RGB matrix in MATLAB?

rgbImage = grayImage / max(max(grayImage)); or rgbImage = grayImage / 255; Which of the above is right,and reason?
user198729
  • 61,774
  • 108
  • 250
  • 348
11
votes
2 answers

How to turn ImageIcon to gray on Swing

I would like to know if there is some way in Swing to turn an ImageIcon to gray scale in a way like: component.setIcon(greyed(imageIcon));
Alfergon
  • 5,463
  • 6
  • 36
  • 56
11
votes
2 answers

Ghostscript color detection

I seem to be unable to find whether Ghostscript is able to simply detect whether job is color or grayscale. I use Ghostscript for conversion of print jobs to PNG, but I also need to have information about color of the job, so I don't have to search…
Martinecko
  • 1,719
  • 4
  • 22
  • 35
10
votes
3 answers

Counting colonies on a Petri dish

I have a bunch of Petri dishes full of dots which I'd like to count in Matlab. Can this be done reliably and in batches? E.g. This plate has 352 colonies I've tried ImageJ but need to do quite a bit of cropping out of the border and get variable…
HCAI
  • 2,213
  • 8
  • 33
  • 65
10
votes
2 answers

How can I grayscale a canvas image in JavaScript?

I have an image inside of an HTML5 canvas with the size of 28x28 pixels. I get the imageData of the canvas as an array of RGBA (red, green, blue, alpha) values using this code: canvas = document.getElementById('canvas'); ctx =…
Tom
  • 151
  • 1
  • 1
  • 8
10
votes
6 answers

Detecting grayscale images with .Net

I am scanning documents to JPG images. The scanner must scan all pages as color or all pages as black and white. Since many of my pages are color, I must scan all pages as color. After the scanning is complete, I would like to examine the images…
Dave
  • 1,721
  • 2
  • 23
  • 46
10
votes
7 answers

How can I convert a color image to grayscale in MATLAB?

I am trying to implement an algorithm in computer vision and I want to try it on a set of pictures. The pictures are all in color, but I don't want to deal with that. I want to convert them to grayscale which is enough for testing the…
Nathan Fellman
  • 122,701
  • 101
  • 260
  • 319
10
votes
2 answers

Use python wand to grayscale image

I want to use the Python API binding for ImageMagick http://wand-py.org to directly manipulate images. I am however not able to deduce from the documentation how to use a grayscale transformation. Can anybody provide information on this…
user2075719
  • 111
  • 1
  • 6
10
votes
2 answers

openCV - draw color contours on greyscale image

I'm working on a segmentation algorithme for medical images and during the process it must display the evolving contour on the original image. I'm working with greyscale JPEG. In order to display the contours I use the drawContours function but I…
alvinleetya
  • 454
  • 2
  • 7
  • 19
10
votes
4 answers

Grayscale image with CSS on Safari 5.x

I am trying to show some images on a page where they should be shown in grayscale, except on mouse hover when they smoothly transition into color. I've made it work nicely on IE, Chrome and Firefox, but it doesn't work on Safari 5.x. The problem is…
alexg
  • 3,015
  • 3
  • 23
  • 36
9
votes
2 answers

MonoTouch convert color UIImage with alpha to grayscale and blur?

I am trying to find a recipe for producing a a blurred grayscale UIImage from a color PNG and alpha. There are recipes out there in ObjC but MonoTouch does not bind the CGRect functions so not sure how to do this. Any ideas? Here is one ObjC…
Sheldon Hage
  • 414
  • 3
  • 8
1 2
3
64 65