Questions tagged [grayscale]

For questions regarding Grayscale, a Bootstrap theme.

972 questions
9
votes
1 answer

Image does not load as grayscale (skimage)

I'm trying to load an image as grayscale as follows: from skimage import data from skimage.viewer import ImageViewer img = data.imread('my_image.png', as_gray=True) However, if I check for its shape using img.shape it turns out to be a…
rdv
  • 682
  • 2
  • 8
  • 19
9
votes
2 answers

How to create Bitmap from grayscaled byte buffer image?

I am trying to get frame image to process while using new Android face detection mobile vision api. So I have created Custom Detector to get Frame and tried to call getBitmap() method but it is null so I accessed grayscale data of frame. Is there a…
rcmalli
  • 357
  • 1
  • 4
  • 8
9
votes
4 answers

Convert HSV to grayscale in OpenCV

I'm a newbie in OpenCV. I'm learning the Segmentation by Watershed algorithm and I have a problem. I have to convert the image color to grayscale for using Watershed. When I use the BGR color space, no problem but with HSV, I'm not sure that the…
Amateur
  • 151
  • 1
  • 2
  • 12
9
votes
1 answer

ImageMagick Reduces Colorspace to Gray

I convert RGB and CMYK TIFF images to RGB JPEGs using convert a.tif -colorspace rgb a.jpg If the TIFF image contains only gray pixels, the colorspace of the resulting JPEG is gray, not RGB. How can I force ImageMagick to always use RGB?
Christoph Walesch
  • 2,337
  • 2
  • 32
  • 44
8
votes
4 answers

Jet colormap to grayscale

I have a jet colormap: and I would like to know if there's some way to convert to a grayscale. I can't use average because maximum and minimum value goes to the same gray color. Or if there's some way to convert to another color palette. I can't…
PerroNoob
  • 843
  • 2
  • 16
  • 36
8
votes
2 answers

Color to grayscale on hover not working in IE11

I'm using Gray for a few elements on the site. However, I can't get it to work in IE11. For example, in the fiddle below, I use JS to add the grayscale and grayscale-fade classes so that the image fades from color to grayscale on hover. How would I…
J82
  • 8,267
  • 23
  • 58
  • 87
8
votes
1 answer

convert jpg to greyscale csv using R

I have a folder of JPG images that I'm trying to classify for a kaggle competition. I have seen some code in Python that I think will accomplish this on the forums, but was wondering is it possible to do in R? I'm trying to convert this folder of…
barker
  • 1,005
  • 18
  • 36
8
votes
2 answers

Want to make the whole page in grayscale except specified div

I have a css code that could make the whole page in grayscale. I now want to embed an iframe inside a div…
AkiEru
  • 780
  • 1
  • 9
  • 34
8
votes
1 answer

Apply a CSS hue rotate filter to a greyscale image

I am trying to work out how to change the hue of a greyscale image using CSS... I have two images (one colour and one greyscale) and have applied this code to both: CSS img { width: 10pc; float: left; } .huerotate { -webkit-filter:…
user2761030
  • 1,385
  • 2
  • 20
  • 33
8
votes
1 answer

Firefox filter grayscale and printing

I've run into a problem getting Firefox's filter css property to grayscale properly on the printed page. For some reason, the grayscaled image is not visible on the printout, though it displays as expected onscreen. After referring to questions like…
dasch88
  • 999
  • 10
  • 13
8
votes
1 answer

BufferedImage - getting the value of a pixel in grayscale color model picture

I have an BufferedImage transformed to grayscale using this code. I usually got the pixel values by BufferedImage.getRGB(i,j) and the gor each value for R, G, and B. But how do I get the value of a pixel in a grayscale image? EDIT: sorry, forgot…
Kajzer
  • 2,138
  • 3
  • 32
  • 46
7
votes
2 answers

How to convert bitmap to grayscale by pixel intensity using GDI?

I'm looking for the simple solution of how to convert the 32-bit bitmap to grayscale using GDI (not GDI+). Is there a possibility e.g. by changing the bitmap's pallete or something ? Of course there is plenty of examples in Delphi like this one, but…
Martin Reiner
  • 2,167
  • 2
  • 20
  • 34
7
votes
1 answer

android-opencv converting mat to grayscale with using matToBitmap/bitmapToMat

I am using newer opencv library of willowgarage in eclipse. And I want to convert a mat variable into grayscale, I've tried everything I found on the net but they didnt work for me. Here is my code package com.deneme.deneme; import…
Rudral
  • 188
  • 2
  • 5
  • 14
7
votes
2 answers

Determine if image is Grayscale or Color using JavaScript?

Is it possible to determine if a given image is grayscale or color using JavaScript?
devnull
  • 93
  • 1
  • 5
7
votes
6 answers

Library for basic image manipulation in C++

I am looking for a great C++ library for doing basic image manipulation. What I need done is to be able to convert an image to grayscale and have access to read the pixels of the image. I have looked at OpenCV, GIL, CImg and Magick++, but either…
chrisbuchholz
  • 639
  • 8
  • 17