grayscale

Cannot get the original colored bitmap after tesseract processing - android

╄→гoц情女王★ 提交于 2019-12-22 18:05:53
问题 I use tesseract library for android to capture certain text from an image. I know that the captured image is not saved anywhere, it gets recycled. I need to find the original colored bitmap. I have been trying to locate the original colored bitmap, but all I could find was a grayscaled bitmap: Bitmap bitmap = activity.getCameraManager().buildLuminanceSource(data, width, height).renderCroppedGreyscaleBitmap(); When I save this bitmap to the sdcard, I get a gray scaled image.

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

房东的猫 提交于 2019-12-22 11:08:43
问题 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 uses 16 bit will be shown as dark instead of whilte). I don't really know how to use the window centre, window width, rescale slop and intercept. Please help me by giving the exact steps to convert 16 bit image to 8 bit image. Also I don't need to

CSS grayscale with animation

≡放荡痞女 提交于 2019-12-22 05:33:29
问题 i have some css for changing my image into grayscale (with some svg for firefox) img.grayscale{ filter: grayscale(100%); -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscale(100%); filter: url(desaturate.svg#greyscale); filter: gray; -webkit-filter: grayscale(1); } but now i want animation on hover for changing the value of the grayscale to 0. I have this code but it doesn't do anything (on chrome of course), i have no idea why it

MonoTouch convert color UIImage with alpha to grayscale and blur?

僤鯓⒐⒋嵵緔 提交于 2019-12-22 04:07:56
问题 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 example of grayscale: (UIImage *)convertImageToGrayScale:(UIImage *)image { // Create image rectangle with current image width/height CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height); // Grayscale color space CGColorSpaceRef

16 bit grayscale png

巧了我就是萌 提交于 2019-12-21 09:08:59
问题 I'm trying to write (using libpng) an 16-bit grayscale image where each point color equals to sum of its coordinates. The following code should produce a 16-bit PNG, but instead produces 8-bit like this. Why? #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <png.h> void save_png(FILE* fp, long int size) { png_structp png_ptr = NULL; png_infop info_ptr = NULL; size_t x, y; png_bytepp row_pointers; png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if

converting a PNGImage to grayscale using delphi

自闭症网瘾萝莉.ら 提交于 2019-12-21 02:43:52
问题 hi there here it is my code: procedure TForm4.Button1Click(Sender: TObject); var png: TPNGImage; data: PRGBQarray; p: ^tagRGBQuad; i, o: integer; begin png := TPNGImage.Create; try png.LoadFromFile('C:\Untitled.png'); for o := 1 to 100 do begin data:=png.Scanline[o]; for I := 1 to 400 do begin p := @data^[i]; p.rgbGreen := p.rgbBlue; p.rgbRed := p.rgbGreen; end; end; img.picture.Assign(png); finally png.Free; end; end; it doesn't work and it makes the pic messy, I'm sure it's because of the

In OpenCV (Python), why am I getting 3 channel images from a grayscale image?

三世轮回 提交于 2019-12-20 10:18:45
问题 I am using Python (2.7) and bindings for OpenCV 2.4.6 on Ubuntu 12.04 I load an image image = cv2.imread('image.jpg') I then check the shape of the image array print image.shape I get (480, 640, 3), which I expect for a 640x480 colour image. I then convert the image to grayscale and check the shape again. gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) print gray_image.shape I get (480, 640, 1), which I expect for a 640x480 grayscale image. I then save the image: cv2.imwrite('gray.jpg',

Convert a dynamic BitmapImage to a grayscale BitmapImage in a Windows Phone application

六月ゝ 毕业季﹏ 提交于 2019-12-20 04:32:43
问题 I would like to Convert a BitmapImage to a Grayscale BitmapImage: Which I get from a method and therefore - the Width and Height are unknown to me. I have tried looking into options such as WritableBitmapEx and static extension methods but they haven't been helpful to me as I would like the return data type to be a BitmapImage as well as I then need to add it to List. Is this possible in a Windows Phone app using C#? I would really appreciate if someone would shed some light into this. Thank

How to change minimum or maximum value by CIFilter in Core image?

感情迁移 提交于 2019-12-19 11:49:22
问题 I'm drawing several grayscale images in iOS. The values of grayscale image have minimum and maximum i.e. for 8 bit values in range [41,244]. I want to change minimum value or maximum value. I want to know how to set a filter in this list to change minimum value and how to set a filter in this list to change maximum value? Maybe the follow of drawing will be good to see : [1. Read raw grayscale data] -> [2. Create CGImageRef] -> [3. Load ref in GPU] and by now, in iOS 6 can apply filter in GPU

How to determine if an Image is Grayscale in C# or VB.NET?

流过昼夜 提交于 2019-12-19 04:14:19
问题 FIRST OF ALL First of all, please note that the answer given in this question will not work for all the grayscale images, and also note that the accepted answer in this other question does not explain at all how to determine if an image is grayscale, but anyways it does not fit my needs because it seems to only cover JPEG and TIFF images and assuming they will have EXIF metadata and the required fields inside it. (I can't understand why people determined that the first question I linked is a