Questions tagged [grayscale]

For questions regarding Grayscale, a Bootstrap theme.

972 questions
5
votes
2 answers

Qt QImage shows wrong grayscale image

I want to visualize a matrix of integer values between 0 and 255 as a gray-scale image in Qt 5.12. First, I built a sample 256x256 uchar array with values between 0 and 255 in each row. then I tried to show the image with QImage and format_grayscale…
Moh
  • 53
  • 2
5
votes
2 answers

Convert a 2D array of int ranging from 0-256 into a grayscale png?

How can I convert a 2D array of ints into a grayscale png. right now I have this: BufferedImage theImage = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB); for(int y = 0; y<100; y++){ for(int x = 0; x<100; x++){ …
wfbarksdale
  • 7,498
  • 15
  • 65
  • 88
5
votes
2 answers

Internet Explorer CSS filter

Is there any way to make this CSS class work in Internet Explorer 11? .inactive { filter: contrast(0.5) sepia(100%) hue-rotate(116deg) brightness(1.2) saturate(0.28); } I tried to use the SVG grayscale filter but it doesn't work, also…
Igino Boffa
  • 686
  • 1
  • 9
  • 21
5
votes
4 answers

How to convert a RGB image (3 channel) to grayscale (1 channel) and save it?

Working with a deep learning project and I have a lot of images, that don't need to have colors. I saved them doing: import matplotlib.pyplot as plt plt.imsave('image.png', image, format='png', cmap='gray') However later when I checked the shape…
J. Devez
  • 329
  • 2
  • 6
  • 15
5
votes
2 answers

Transform a colored image to a grayscale image using XAML?

Using XAML preferably, I need to dynamically apply a gray-scale filter on a colored image from bottom to top. That's to say, i would like to be able to change the offset value of the gray-scale filter applied to my image pro grammatically. For…
user9375565
5
votes
1 answer

Image sequence prediction with keras

I'm having fun with keras lately and i would like to know how one would approach this problem. I have a sequence of 100 images. They are daily images of a radar map, for 100 consecutive days. I would like to predict the image for the next…
newbbbbb
  • 71
  • 1
  • 3
5
votes
2 answers

convert 16 bit grayscale DICOM image to 8 bit: the correct procedure

I have been trying to create an image viewer for DICOM image. My program reads all the 8 bit colour and grayscale image almost correctly. But when I try to open a 16 bit image using the first 8 bits of the image, some parts are missing (pixels which…
5
votes
2 answers

Is there a way I can gray out an ImageButton in Android without maintaining a separate gray copy of the original Image?

I am trying to have an ImageButton that initially has a gray effect on it & turns into its original color when selected. I'm trying to achieve something like . I know this can be done in CSS, but was wondering if any Android attribute / function…
Auro
  • 1,578
  • 3
  • 31
  • 62
5
votes
3 answers

Save canvas in grayscale

I was wondering if it is possible to have a coloured canvas in HTML5 and then save it as a black and white (grayscale) PNG, while you click on the save button. I managed to save the canvas as a PNG already, which is great! But I'd like to add the…
Pumpkin_M
  • 161
  • 1
  • 2
  • 12
5
votes
1 answer

How to convert gray scale png image to RGB from comand line using image magick

I am trying to convert an png Gray scale image to RGB png image using the following command. convert HopeLoveJoy.png -size 1x1 -fill "rgba(0%,1%,2%,0)" -draw "color 511,511 point" out_test.png By using the above the above command I am able to…
Sahanaa D
  • 95
  • 1
  • 6
5
votes
1 answer

Display transparent image on axes (MATLAB)

So I have this transparent image (https://i.stack.imgur.com/uN8DK.jpg) that I want to display on an axes in MATLAB with its transperancy. To do this, I used the code below, which works with other transparent png images that I have: [A, map, alpha] =…
user1106340
  • 106
  • 1
  • 7
5
votes
1 answer

grayscale histogram with gnuplot

I'm new to gnuplot and I want to draw a triple histogram for a set of data of any length. Here is my code but the line set palette gray seems to have no effect -- everything is still in RGB. What am I missing here? set terminal pdf enhanced set…
user1743798
  • 445
  • 2
  • 7
  • 20
5
votes
2 answers

Converting 4-Bit grayscale byte array to Bitmap Android

I am retrieving a raw image from a camera and the specs of the image are as follows: 80 x 60 resolution 4-bit grayscale I retrieve the image as a byte array and have an array that is 2400 (1/2 * 80 * 60) bytes long. The next step is to convert the…
Ankit Goyal
  • 437
  • 1
  • 7
  • 24
5
votes
1 answer

matplotlib, set color of lines along a grayscale using numbers from 0. (white) to 1. (black)

I've been trying to follow the instructions here to set the color of many lines along a grayscale using floats from 0. (white) to 1. (black). The function line.set_color() accepts the floats, but the error below appears when I do…
Saullo G. P. Castro
  • 56,802
  • 26
  • 179
  • 234
5
votes
3 answers

Removing outliers from a grey-scale image

Question I have an images sequence representing depth information which I'd like to clean. There are some outliers (values with intensity below 25, for a 0-255 range) which I would like to be filled with an acceptable alternative (an average value…
Atcold
  • 683
  • 2
  • 10
  • 31