grayscale

C# Convert Grayscale data to colored image [closed]

二次信任 提交于 2019-12-10 00:34:48
问题 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 . I want to convert grayscale data to colored image using C#. I try 2D and convert 1D data and show bitmap, but I want to show Colored image. 回答1: The built in graphics and drawings function from the .NET framework do not support working with Grayscale images. I did the same thing to display a gray

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

大兔子大兔子 提交于 2019-12-09 17:36:57
问题 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 android.app.Activity; import android.os.Bundle; import android.widget.ImageView; import org.opencv.android.Utils; import org.opencv.core.Mat; import org.opencv.imgproc.Imgproc; import android.graphics.Bitmap; import android.graphics.BitmapFactory; public class main

Best way to convert pdf to greyscale with php?

♀尐吖头ヾ 提交于 2019-12-08 09:37:05
问题 If I want to convert a pdf to greyscale whats the best way to go about it. Im currently using tcpdf to convert html to pdf but I also need an option where I can convert it to greyscale. Whats the best way to go about doing this. 回答1: If you have Imagick (imagemagick) installed, you can take your generated PDF and save another gray-scaled one. $image = new Imagick('generatedPDF.pdf'); $image->setColorspace(imagick::COLORSPACE_GRAY); $image->writeImage('newPic.pdf'); $image->clear(); $image-

Get grayscale image directly from webcam using Opencv

守給你的承諾、 提交于 2019-12-08 08:30:37
问题 Since in my embedded application I need images in grayscale, in order to save time I'm trying to get a frame from the webcam directly in grayscale without getting it from RGB format conversion. The examples that I've found gets the frame in RGB and then converts it with cvCvtColor(im_rgb,im_gray,CV_RGB2GRAY) Thanks. 回答1: On Linux, simply use the v4l2-ctl command to reduce all saturation and get the camera to spit out grayscale output: v4l2-ctl -c saturation=0 Of course, that will work only if

J2ME: Convert transparent PNG image to grayscale

ε祈祈猫儿з 提交于 2019-12-08 06:17:20
问题 is there any possiblity in J2ME to convert an image (loaded from a png file with alpha) to a new transparent grayscale image? Until now I only got the rgb values, but not the alpha. Thanks. Edit: yes, it should be 32 bit grayscale. 回答1: I found the solution and here is the code: public Image getGrayScaleImage() { int[] rgbData = new int[getWidth() * getHeight()]; image.getRGB(rgbData, 0, getWidth(), 0, 0, getWidth(), getHeight()); for (int x = 0; x < getWidth() * getHeight(); x++) { rgbData[x

Converting Bitmap(RGB_565) to Grayscale(8 bit) Android

末鹿安然 提交于 2019-12-08 05:57:42
问题 I am doing a Face Recognition project for my final year. I have to do face Recognition on Android using Local Binary Pattern(LBP). I searched a lot on the internet for codes for face recognition using LBP in java, but couldn't find anything implementable on android. So now I am forced to writing it all, and I am a kind of a newbie to android as well as image processing. I have found out a way to capture images from the camera. public class CameraCapture extends Activity { protected boolean

wkhtmltopdf + mixed photo colors

心不动则不痛 提交于 2019-12-08 04:43:24
问题 I have a page with color and black & white images, when I use wkhtmltopdf to generate a pdf from the html file, I get only the color images, how can I get it to print all the images, I have tried the advance options, but no success. If I print in grayscale, then all the images are coming, but I don't want grayscale. Any help? 回答1: I figured out how to solve this problem, I tried a trial-and-error method and figured out that if we provided the following parameters all the images irrespective

Converting 24bit RGB image to 8bit grayscale with opencv-node in node.js

▼魔方 西西 提交于 2019-12-08 04:23:58
问题 I'm trying to capture images within node.js from a webcam connected to a Raspberry Pi. Capturing works fine, but now when I want to transmit the images I have some serious problems with framerate and lags. Now my first idea was to convert the RGB images to 8bit grayscale, that should increase the performance by factor 3 (i hope..). I'm using node.js and opencv-node for this. Here you can see some code snippet for the moment: var startT = new Date().getTime(); var capture = new cv.VideoCapture

read/write avi video on MAC using openCV

南楼画角 提交于 2019-12-08 04:08:47
问题 I am trying to read avi video and write it again as it is without any change using openCV 2.4.0 on MAC 10.6.8 My videos is grayscale with frame_rate = 25 and Codec = 827737670 which is FFV1 (I guess) The problem is .... when I read and write the video as it is .... I see many changes in size and in color ... After 3 or 4 times of writing I can see the video start to be (Pink) color !!! I am not sure what is the problem !!! this is my code for the people who interest Appreciate your help in

Java ImageIO Grayscale PNG Issue

耗尽温柔 提交于 2019-12-07 15:27:49
问题 I have a grayscale image ("lena" actually) which I want to experiment with. I got it as a 512x512 PNG file with 216 shades of gray. What happens is, when I read it with Java ImageIO, like that: String name = args[0]; File fi = new File(name); BufferedImage img = ImageIO.read(fi); I get a BufferedImage with only 154 colours ! I only realized this, cause my processed images which looked sallow, lacking deep black. Even more irritating, when I use XnView convert the PNG to a GIF, which is a