For questions regarding Grayscale, a Bootstrap theme.
Questions tagged [grayscale]
972 questions
-1
votes
1 answer
C# EmguCV PictureBox - How to display unsigned 16 bit grayscale images?
I have a monochrome camera in my project that I read images of at either 8bit/16bit depth.
I'm using EmguCV library to create a Mat object out of byte array that I read off the camera and want to display the images on an EmguCV PictureBox…

p0miki
- 23
- 4
-1
votes
1 answer
How can i convert images into grayscale?
I have 1000 of images. Now I like to convert those images into grayscale?
import tensorflow as tf
from tensorflow.keras.utils import img_to_array
#df['image_name'] = df['image_name'].apply(str)
df_image = []
for i in tqdm(range(df.shape[0])):
…

Pranab
- 379
- 3
- 11
-1
votes
2 answers
OpenCV - I need to insert color image into black and white image and
I insert black and white image into color image with this code and it is ok:
face_grey = cv.cvtColor(face, cv.COLOR_RGB2GRAY)
for row in range(0, face_grey.shape[0]):
for column in range(face_grey.shape[1]):
img_color[row + 275][column + 340]…

Python_Newbie
- 19
- 4
-1
votes
1 answer
How to convert RGB matrix to Grayscale array in Python?
I need an help to convert an array of rgb values (3 channels) into a single dimension grayscale array.
Thank you so much.
-1
votes
1 answer
OpenCV is not graying an image with cv2.cvtColor when displayed with matplotlib
I tried to gray an image but it does not work properly like it should. It just applied a kind of filter as you can see by using cv2.COLOR_BGR2GRAY function. Kindly someone help me to get over with this issue.

Ahmer Shahid
- 3
- 1
-1
votes
1 answer
Python script to convert RBG image dataset into Grayscale images using pillow
I want to convert an image RGB dataset to Grayscale dataset using pillow. I want to write a script that takes in the dataset path and converts all images one by one into grayscale. At the end I want to save this script, and want to run this script…

aarya
- 83
- 1
- 8
-1
votes
1 answer
How to change image from gray scale format into RGB format
I was working on research about computer vision, but I got stuck when following a paper that said he could convert Grayscale image into RGB image using Python.
The first image would be like this.
The output will be like this.
Is anyone could help…

theDreamer911
- 85
- 1
- 9
-1
votes
1 answer
Convert entire folder to grayscale using image magick?
Another person asked this question but the answers are not adjusted to the average civilian comprehension.
I am trying to convert an entire folder to grayscale, using image magick.
I want to convert the entire folder of JPG and PNG images that are…

Miki Wiki
- 9
- 2
-1
votes
2 answers
OpenCV - How to see which algorithm is used behind a function? (imread)
There are several ways in python to generate a greyscale image from an RGB version. One of those is just to read an image as greyscale using OpenCV.
im = cv2.imread(img, 0)
While 0 equals cv2.IMREAD_GRAYSCALE
There are many different algorithms to…

Jürgen K.
- 3,427
- 9
- 30
- 66
-1
votes
1 answer
how to gray scale a picture in python using rgb?
I'm writting a function (it has to be called into the main py file later where i take the rgb values, add them, and average them so to get a gray picture. Here is what i have so far:
def gray_scale(img,x,y):
pixel=img[x][y]
r= pixel[0]
…
-1
votes
1 answer
RGb to gray conversion in CV2
I am trying to convert an image from RGB to grayscale. My image looks like this after reading
img = cv2.imread('sample.png')
plt.imshow(img)
I tried converting this to grayscale using cv2 function and the image looks as below after…

iamkk
- 135
- 1
- 16
-1
votes
1 answer
OpenCV: How to make the gray text darker?
I have a scanned document image where some texts are in light gray and some texts are in black colors.
I have tried using Dilation in OpenCV hoping to make the gray changed towards a black color (darker) but it just made the text font image…

koayst
- 2,095
- 3
- 17
- 16
-1
votes
2 answers
CSS Border radius and filter grayscale not working together
I have some css in place that uses both a border-radius and a grayscale filter. I want the border radius to be in place all the time but the grayscale to disappear on hover.
The border radius works fine until I add in the grayscale, then it stops…

Jay
- 346
- 1
- 3
- 18
-1
votes
1 answer
Is there a way to convert x,y coordinates to a grayscale matrix? (python)
For example if I have an 2xN matrix where the first row are my x values and the second row are my y values, can I convert these points to a grayscale matrix? Is there such thing?
ie)
X = [[1,2,3],[4,5,6]

Angie
- 183
- 3
- 13
-1
votes
1 answer
algorithm from cv2.cvtColor (img, cv2.COLOR_BGR2GRAY)
I want to make a program to convert RGB images to grayscale in large quantities and I use this code
files = [f for f in listdir(path) if isfile(join(path,f))]
for image in files:
try:
img = cv2.imread(os.path.join(path,image))
…

xaner
- 25
- 2
- 5