Search Results

Search found 116 results on 5 pages for 'grayscale'.

Page 1/5 | 1 2 3 4 5  | Next Page >

  • Capture documents in bitonal, or grayscale then downsample

    - by Jason R. Coombs
    I'm about to embark on a document archival process. I'm going to spend a lot of good money to archive some paper (actually microfiche) to TIFF images. I have a choice of 300-dpi bitonal (2-bit, black/white) or 300-dpi grayscale (8-bit). Cost is the same for either format. Data volume (and thus image size) is not a factor. It seems to me that the grayscale, since scanned at the same resolution as the bitonal, would always contain more information and could always be downsampled to the equivalent bitonal image. Are there any downsides to selecting grayscale, and then later downsampling to bitonal if desired? In other words, is it possible that the scanning software will perform a more accurate (or more legible) representation than a grayscale image converted to bitonal?

    Read the article

  • Making entire scene fade to grayscale

    - by Fibericon
    When the player loses all of their lives, I want the entire game screen to go grayscale, but not stop updating immediately. I'd also prefer it fade to grayscale instead of suddenly lose all color. Everything I've found so far is either about taking a screenshot and making it grayscale, or making a specific texture grayscale. Is there a way to change the entire playing field and all objects within to grayscale without iterating through everything?

    Read the article

  • Turn Windows 7 desktop into grayscale

    - by Axarydax
    Is there a universal way to turn Windows 7 Aero desktop, all windows, etc into grayscale? I had an option to do this in Intel video drivers on my old laptop, now I have NVIDIA and don't know how to replicate this effect. There might be a shader or filter that would cause Aero to render stuff into grayscale, but I was unable to find anything. Or must it be explicitly supported by video driver as a bonus?

    Read the article

  • Grayscale in matlab

    - by ruthenium
    I'm trying to convert a 2D array to grayscale but using mat2gray doesn't do anything and imshow() appears to create a binary image that when I graph I cannot rotate it, e.g. the original array is 2d but maps in 3d. So, what is the best way to take a grayscale of 2d array in Matlab so if you have A=rand(5,10) or something and want to take a grayscale of that, what is the best way?

    Read the article

  • Conversion to grayscale using emguCV in C#

    - by Amal
    Hi. I am new to EmguCV. I want to convert an rgb image into gray scale. For the conversion I have used the code Image grayImage = ColordImage.Convert(); Now when i compile this code in C# it gives no error,but when i run it then after a few seconds it gives me the exception at this line of code that this type of conversion is not supported by OpenCV. Now can any one help me solve this problem. Regards Amal

    Read the article

  • Changing RGB color image to Grayscale image using Objective C

    - by user567167
    I was developing a application that changes color image to gray image. However, some how the picture comes out wrong. I dont know what is wrong with the code. maybe the parameter that i put in is wrong please help. UIImage *c = [UIImage imageNamed:@"downRed.png"]; CGImageRef cRef = CGImageRetain(c.CGImage); NSData* pixelData = (NSData*) CGDataProviderCopyData(CGImageGetDataProvider(cRef)); size_t w = CGImageGetWidth(cRef); size_t h = CGImageGetHeight(cRef); unsigned char* pixelBytes = (unsigned char *)[pixelData bytes]; unsigned char* greyPixelData = (unsigned char*) malloc(w*h); for (int y = 0; y < h; y++) { for(int x = 0; x < w; x++){ int iter = 4*(w*y+x); int red = pixe lBytes[iter]; int green = pixelBytes[iter+1]; int blue = pixelBytes[iter+2]; greyPixelData[w*y+x] = (unsigned char)(red*0.3 + green*0.59+ blue*0.11); int value = greyPixelData[w*y+x]; } } CFDataRef imgData = CFDataCreate(NULL, greyPixelData, w*h); CGDataProviderRef imgDataProvider = CGDataProviderCreateWithCFData(imgData); size_t width = CGImageGetWidth(cRef); size_t height = CGImageGetHeight(cRef); size_t bitsPerComponent = 8; size_t bitsPerPixel = 8; size_t bytesPerRow = CGImageGetWidth(cRef); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceGray(); CGBitmapInfo info = kCGImageAlphaNone; CGFloat *decode = NULL; BOOL shouldInteroplate = NO; CGColorRenderingIntent intent = kCGRenderingIntentDefault; CGDataProviderRelease(imgDataProvider); CGImageRef throughCGImage = CGImageCreate(width, height, bitsPerComponent, bitsPerPixel, bytesPerRow, colorSpace, info, imgDataProvider, decode, shouldInteroplate, intent); UIImage* newImage = [UIImage imageWithCGImage:throughCGImage]; CGImageRelease(throughCGImage); newImageView.image = newImage;

    Read the article

  • [C#] GrayScale (by ColorMatrix) causes OutOfMemoryException. Why ?

    - by Tony
    I have 2 forms, A and B. On the Form A, I click a button and an Image is being loaded to a PictureBox located ona the Form B. And, I want to set GrayScale to this image by: public void SetGrayScale(PictureBox pb) { ColorMatrix matrix = new ColorMatrix(new float[][] { new float[] {0.299f, 0.299f, 0.299f, 0, 0}, new float[] {0.587f, 0.587f, 0.587f, 0, 0}, new float[] {0.114f, 0.114f, 0.114f, 0, 0}, new float[] { 0, 0, 0, 1, 0}, new float[] { 0, 0, 0, 0, 0} }); Image image = (Bitmap)pb.Image.Clone(); ImageAttributes attributes = new ImageAttributes(); attributes.SetColorMatrix(matrix); Graphics graphics = Graphics.FromImage(image); graphics.DrawImage(image, new Rectangle(0, 0, image.Width, image.Height), 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attributes); graphics.Dispose(); pb.Image = image; } This code works properly when the PictureBox is on the same form (A). But, when it is on the Form B, the OutOfMemoryException is raised. Why ?

    Read the article

  • CSS - Colorizing Grayscale Image

    - by Steve
    In CSS, is there a standard way to colorize or apply a tint to a grayscale image? I would like to create a grayscale image to show focus over an element, and allow the color of the focus to be configurable by colorizing the grayscale image. Thanks

    Read the article

  • How to make my display Grayscale?

    - by Oldarney
    I want to reduce the saturation of my laptop monitor to the point that it is almost grayscale. That's the goal. Intel and Asus don't have an answer. Asus Splendid and the intel graphics control panel can increase the saturation, but not lower it. I would prefer a software solution, although I DIY'ed a vga grayscale adapter for my desktop. I have an Asus UL30A with an Intel GMA 4500MHD. I know that the latest ATI cards, windotosh's and high end nvidia cards all support control panel desaturation. Why? black and white makes me 3 times more productive.

    Read the article

  • directshow Renderstream fails with grayscale bitmaps

    - by Roey
    Hi all. I'm trying to create a directshow graph to playback a video composed of 8bit grayscale bitmaps. (using directshow.net.) I'm using a source filter and the vmr9 renderer. The source filter's output pin is defined using the following code : bmi.Size = Marshal.SizeOf(typeof(BitmapInfoHeader)); bmi.Width = width; bmi.Height = height;; bmi.Planes = 1; bmi.BitCount = (short)bitcount; bmi.Compression = 0; bmi.ImageSize = Math.Abs(bmi.Height) * bmi.Width * bmi.BitCount / 8; bmi.ClrUsed = bmi.BitCount <= 8 ? 256 : 0; bmi.ClrImportant = 0; //bmi.XPelsPerMeter = 0; //bmi.YPelsPerMeter = 0; bool isGrayScale = bmi.BitCount <= 8 ? true : false; int formatSize = Marshal.SizeOf(typeof(BitmapInfoHeader)); if (isGrayScale == true) { MessageWriter.Log.WriteTrace("Playback is grayscale."); /// Color table holds an array of 256 RGBQAD values /// Those are relevant only for grayscale bitmaps formatSize += Marshal.SizeOf(typeof(RGBQUAD)) * bmi.ClrUsed; } IntPtr ptr = Marshal.AllocHGlobal(formatSize); Marshal.StructureToPtr(bmi, ptr, false); if (isGrayScale == true) { /// Adjust the pointer to the beginning of the /// ColorTable address and create the grayscale color table IntPtr ptrNext = (IntPtr)((int)ptr + Marshal.SizeOf(typeof(BitmapInfoHeader))); for (int i = 0; i < bmi.ClrUsed; i++) { RGBQUAD rgbCell = new RGBQUAD(); rgbCell.rgbBlue = rgbCell.rgbGreen = rgbCell.rgbRed = (byte)i; rgbCell.rgbReserved = 0; Marshal.StructureToPtr(rgbCell, ptrNext, false); ptrNext = (IntPtr)((int)ptrNext + Marshal.SizeOf(typeof(RGBQUAD))); } } This causes Renderstream to return "No combination of intermediate filters could be found to make the connection." Please help! Thanks.

    Read the article

  • Monitor-Specific Color Profile Results In Yellow Grayscale Images

    - by Zian Choy
    I recently purchased a new Acer S201hl monitor. Many lay reviews compliment its color accuracy with people noting only a bit of a blueish tinge. After a little time, Windows found, and I installed, the Acer drivers via Microsoft Update. During the installation process, the software installed an ICC profile for the monitor from Acer. I recently noticed that when I view photos using Windows Live Photo Gallery, the colors are wrong. For example, grayscale document scans appear with yellow backgrounds instead of white backgrounds. This happens with both my external monitors and my ThinkPad's built-in screen. When I removed the monitor-specific profile from the list of profiles associated with a monitor (for example, removing the Acer profile from the Acer monitor), the problem went away for that screen. I checked with Microsoft KB939395 and though it says "an incorrect color profile [...] is used for the monitor," the profile associated with my ThinkPad's screen seemed to be correct, based on its name.

    Read the article

  • Batch folder of images into grayscale using php

    - by James
    Can anyone spot where I'm going wrong here. It should be creating grayscale copies of images in one folder and saving them in another folder. Could it be to do with the way im referencing the file locations. Folder permissions on both folders are 777 function grayscalecopy($targetfile, $outputfile){ $size = GetImageSize($targetfile); $width = $size[1]; $height = $size[0]; $canvas = imagecreatetruecolor($width, $height); $sourceimage = imagecreatefromjpeg($targetfile); imagefilter($sourceimage, IMG_FILTER_GRAYSCALE); imagecopy($canvas, $sourceimage, 0, 0, 0, 0, $width, $height); imagejpeg($canvas, $outputfile, 95); imagedestroy($sourceimage); imagedestroy($canvas); echo "Converted ".$targetfile." to grayscale as ".$outputfile." ".$width."x".$height."<br/>"; } $serverfiles = glob("artworkimages/thumbs/*.*"); //$numbertocache = count($serverfiles); $numbertocache = 10; for ($i=0; $i<$numbertocache; $i++) { $serverfilesshort=explode("/",$serverfiles[$i]); $serverfilesshort=$serverfilesshort[count($serverfilesshort)-1]; grayscalecopy($serverfiles[$i], "artworkimages/thumbs/grays/".$serverfilesshort); }

    Read the article

  • How can I forward an application with X11 in grayscale

    - by ??????? ???????????
    I am trying to run a graphical application at home and display it on a it on a laptop which is located about six routing hops away. The problem is that the connection is so slow (or rather there is so much GOOEY being transfered) that the mouse is unresponsive and it takes a "long time" to redraw the window even at a resolution of 800x600 pixels. The connection speeds are 10MBit up at home and about 1MBit down on the laptop, which I think should be sufficient for looking at some GUI in (almost) real time. Since this traffic is sent over over a secure shell, I have enabled Compression with highest CompressionLevel along with Ciphers set to blowfish-cbc. This has substantially improved the responsiveness of the application, making it nearly usable. However, my goal is to improve the performance even further by sacrificing colors and even frame rate. The application to be displayed a Qemu SDL window with a graphically-oriented OS in it. This is not strictly relevant, but perhaps there are options to tweak the SDL output which I am not aware of. A possible workaround would be to run the application in a "hidden" X server and enabling TigerVNC on that X server. This would automatically give me the benefits of an optimized VNC viewport, but the goal is to do without (reduce complexity). The question I'm asking is what are my options for reducing the data-rate generated on the server in order to make the graphical application more usable on the client. As mentioned, colors are not important and I could probably work with 5-16 fps. Both machines are running Gentoo with the software in question being: workstation X.Org X Server 1.10.4 OpenSSH_5.8p1-hpn13v10, OpenSSL 1.0.0e QEMU emulator version 0.15.1 (qemu-kvm-0.15.1) laptop X.Org X Server 1.12.2 OpenSSH_5.8p1-hpn13v10lpk, OpenSSL 1.0.0j

    Read the article

  • Applying effects to an existing program that uses BasicEffect

    - by Fibericon
    Using the finished product from the tutorial here. Is it possible to apply the grayscale effect from here: Making entire scene fade to grayscale Or would you basically have to rewrite everything? EDIT: It's doing something now, but the whole grayscale seems extremely blue. It's like I'm looking at it through dark blue sunglasses. Here's my draw function: protected override void Draw(GameTime gameTime) { device.SetRenderTarget(renderTarget); graphics.GraphicsDevice.Clear(Color.CornflowerBlue); //Drawing models, bullets, etc. device.SetRenderTarget(null); spriteBatch.Begin(0, BlendState.Additive, SamplerState.PointWrap, DepthStencilState.Default, RasterizerState.CullNone, grayScale); Texture2D temp = (Texture2D)renderTarget; grayScale.Parameters["coloredTexture"].SetValue(temp); grayScale.CurrentTechnique = grayScale.Techniques["Grayscale"]; foreach (EffectPass pass in grayScale.CurrentTechnique.Passes) { pass.Apply(); } spriteBatch.Draw(temp, new Vector2(GraphicsDevice.PresentationParameters.BackBufferWidth/2, GraphicsDevice.PresentationParameters.BackBufferHeight/2), null, Color.White, 0f, new Vector2(renderTarget.Width/2, renderTarget.Height/2), 1.0f, SpriteEffects.None, 0f); spriteBatch.End(); base.Draw(gameTime); } Another edit: figured out what I was doing wrong. I have Blendstate.Additive in the spriteBatch.Draw() call. It should be Blendstate.Opaque, or it literally tries to add the blank blue image to the grayscale image.

    Read the article

  • Copying a 14bit grayscale image (saved in long[]) to a pictureBox

    - by Itsik
    My camera gives me 14bit grayscale images, but the API's function returns a long* to the image data. (so i'm assuming 4 bytes for each pixel) My application is written in C++/CLI, and the pictureBox is of .NET type. I am currently using the BitmapData.LockBits() mechanism to gain pointer access to the image data, and using memcpy(bmpData.Scan0.ToPointer(), imageData, sizeof(long)*height*width) to copy the image data to the Bitmap. For now, the only PixelFormat that is working is 32bit RGB, and the image appears in shades of blue with contours. Trying to initialize the Bitmap as 16bppGrayscale isn't working. I would ideally want to cast the array from long to word and using a 16bit format (hoping the the 14bit data will be displayed properly) but I'm not sure if this works. Also, I don't want to iterate over the image data, so finding the min/max and then histogram stretching to [0..255] isnt an option for me (the display must be as efficient as possible) Thanks

    Read the article

  • character matching in grayscale image

    - by maximus
    I made patterns: images with the "A" letter of different sizes (from 12 to 72: 12, 14, .., 72) And I tested the method of pattern matching and it gave a good results. One way to select text regions from image is to run that algorithm for all small and big letters and digits of different sizes. And fonts! I don't like it. Instead of it I want to make something like a universal pattern or better to say: scanning image with different window sizes and select those regions where some function (probability of that there is a character at that window) is more than some fixed value. Do you know any methods or ideas to make that function? It must work with original image (grayscale).

    Read the article

  • Grayscale image with colored spotlight in JavaFX

    - by DaUltimateTrooper
    I need a way to have a gray scale image in an ImageView and on mouse moved if the cursor position is in the ImageView bounds to show a colored spotlight on the mouse position. I have created a sample to help you understand what I need. This sample negates the colors of a colored image on the onMouseMoved event. package javafxapplication3; import javafx.scene.effect.BlendMode; import javafx.scene.Group; import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.paint.Color; import javafx.scene.paint.RadialGradient; import javafx.scene.paint.Stop; import javafx.scene.Scene; import javafx.scene.shape.Circle; import javafx.stage.Stage; var spotlightX = 0.0; var spotlightY = 0.0; var visible = false; var anImage = Image { url: "{__DIR__}picture1.jpg" } Stage { title: "Spotlighting" scene: Scene { fill: Color.WHITE content: [ Group { blendMode: BlendMode.EXCLUSION content: [ ImageView { image: anImage onMouseMoved: function (me: MouseEvent) { if (me.x > anImage.width - 10 or me.x < 10 or me.y > anImage.height - 10 or me.y < 10) { visible = false; } else { visible = true; } spotlightX = me.x; spotlightY = me.y; } }, Group { id: "spotlight" content: [ Circle { visible: bind visible translateX: bind spotlightX translateY: bind spotlightY radius: 60 fill: RadialGradient { centerX: 0.5 centerY: 0.5 stops: [ Stop { offset: 0.1, color: Color.WHITE }, Stop { offset: 0.5, color: Color.BLACK }, ] } } ] } ] }, ] }, } I am a total newbie what can I say...

    Read the article

  • image filter that spits out pi

    - by patrickinmpls
    I've seen this before but I forgot what's its called. Does anyone know of software that takes a picture and spits out an image of the number pi, ie. 3.14... not the symbol? It basically kinda looks like ascii art but the numbers are different shades of gray so it is like a black and white photo. Thanks!

    Read the article

  • Canny edge detection - grayscale images always coming up as 3-channel, unusable?

    - by cvcentral
    I am working through the book "Learning OpenCV" from the O'Reilly series and am trying to perform a canny edge detection sample. Any grayscale image I choose seems to come up as having 3 channels, and to the best of my knowledge, canny only works with single channel images, so this always fails. I am even using the images provided by OpenCV. Here is my code.. IplImage* doCanny(IplImage* in, double lowThresh, double highThresh, double aperture) { if(in->nChannels != 1) return(0); //canny only handles gray scale images IplImage* out = cvCreateImage(cvSize(in->width, in->height), IPL_DEPTH_8U, 1); cvCanny(in, out, lowThresh, highThresh, aperture); return(out); }; IplImage* img = cvLoadImage("someGrayscaleImage.jpg"); IplImage* out = doCanny(img, 10, 100, 3); Why might this always give me 3-channel images? How can I solve this?

    Read the article

1 2 3 4 5  | Next Page >