image-processing

C#: Why am I getting "the process cannot access the file * because it is being used by another process" with this code?

I'm trying to convert bmp files in a folder to jpg, then delete the old files. The code works fine, except it can't delete the bmp's. DirectoryInfo di = new DirectoryInfo(args[0]); FileInfo[] files = di.GetFiles("*.bmp"); foreach (FileInfo file in files) { string newFile = file.FullName.Replace("bmp", "jpg"); Bitmap bm = (Bitmap...

Handling Corrupted JPEGs in C#

We have a process that pulls images from a remote server. Most of the time, we're good to go, the images are valid, we don't timeout, etc. However, every once and awhile we see this error similar to this: Unhandled Exception: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+. at System.Drawing.Image....

file_get_contents to image and change quality

Hey I have some code that downloads an image from a remote server $data = file_get_contents("$rURL"); I want to then change the quality of this image, but do not want to save it out to a file first, how do I convert $data into an image that I can then use in imagecopyresampled? Thanks ...

Are there any 3rd Party libraries for image processing in C#?

Just wondering if there's anything out there to help make my project a lot easier to deal with. I'm working on a program that uses the Wiimote and infrared pen (mapped to the mouse) to manipulate images in real time and I'd much rather not have to use all my time figuring out how to make the program resize and rotate images efficiently w...

What sort of acceleration does openCV use ? How can it process so fast ?

I've been using openCV quite a bit lately and I'm amazed at how fast it can process arrays. Is it using a special type of optimization or relying on special features of the CPU ? I'm on an Intel CPU btw. ...

Real-time image slicing for Deep Zoom and Silverlight 4

Is there an example where the Deep Zoom images will prepare dynamically in real time? Is it even possible with Silverlight 4? So basically, whatever the Deep Zoom composer is doing under the hood should happen in real-time, on demand... ...

Getting Greyscale pixel value from RGB colourspace in Java using BufferedImage

Anyone know of a simple way of converting the RGBint value returned from <BufferedImage> getRGB(i,j) into a greyscale value? I was going to simply average the RGB values by breaking them up using this; int alpha = (pixel >> 24) & 0xff; int red = (pixel >> 16) & 0xff; int green = (pixel >> 8) & 0xff; int blue = (pixel) & 0xff; and the...

Image coding library

Is there any good library for lossless image encoding/decoding that has compression rate more or less similar to PNG but decoding to raw RGB bitmap data would be much faster than PNG? Also alpha transparency is needed, but not essential because, alpha channel could be taken from separate image. Original problem lies in slowness of read...

Converting .eps to .jpg

Our print team saves raster images as .eps files. We need to convert about 11000 .eps to .jpg. We are using ImageMagick (with Ghostprint) on Linux. The conversion occurs but the resulting .jpg is not the same size as the source .eps - It's about 1/2 the size. Probably a problem converting a vector to a raster. Any way to solve this? ...

How to find about structure of bitmap and JPEG files?

I'm trying to write a very simple image processing program for fun and practice. I was using System.Drawing. ... .Bitmap class to handle images and edit their data. but now I want to write my own class of Bitmap object implementation and want to know how bmp files (and other common bitmap formats) and their meta-data (indexing, color sys...

How to speed up drawing of scaled image? Audio playback chokes during window resize.

I am writing an audio player for OSX. One view is a custom view that displays a waveform. The waveform is stored as a instance variable of type NSImage with an NSBitmapImageRep. The view also displays a progress indicator (a thick red line). Therefore, it is updated/redrawn every 30 milliseconds. Since it takes a rather long time to rec...

Displaying Image On SmallBASIC

I want to display a image using SmallBASIC. For this I've started by searching on the references, then I found a reference for IMAGE, that is like this: IMAGE #handle, index, x, y [,sx,sy [,w,h]] Then I found another to open files(OPEN): OPEN file [FOR {INPUT|OUTPUT|APPEND}] AS #fileN But I want to know some things: What image ty...

Laplacian of Gaussian: how does it work? (opencv)

Does anybody know how does it work and how to do it using opencv? Laplacian can be calculated using opencv, but the result is not what I expected. I mean I expect the image to be approximately constant contrast at background regions, but it is black, and edges are white. There are a lot of noise also, even after gauss filter. I filter im...

Shrinking image by 57% and centering inside css structure

Hy, i'm really stuck. I'll go step by step and hope to make it short. This is the html structure: <li class="FAVwithimage"> <a href=""> <img src="pics/Joshua.png"> <span class="name">Joshua</span> <span class="comment">Developer</span> <span class="arrow"></span> </a> </li> Before i paste the css class...

In a digital photo, how can I detect if a mountain is obscured by clouds?

The problem I have a collection of digital photos of a mountain in Japan. However the mountain is often obscured by clouds or fog. What techniques can I use to detect that the mountain is visible in the image? I am currently using Perl with the Imager module, but open to alternatives. All the images are taken from the exact same posit...

How do I download image from datastore in app engine and Django without using Wsgi Request Handler.

How do I download image from datastore in app engine and Django without using Wsgi Request Handler. ...

How does Content-Aware fill work?

In the upcoming version of Photoshop there is a feature called Content-Aware fill. This feature will fill a selection of an image based on the surrounding image - to the point it can generate bushes and clouds while being seamless with the surrounding image. See http://www.youtube.com/watch?v=NH0aEp1oDOI for a preview of the Photoshop ...

problem with background subtraction

I'm doing background subtraction using opencv. The problem is the foreground object is not always detected correctly. To deal with this I would like to use four or five images, and take their average as the background image. How can I do that? ...

converting gif image to pixels and then back to gif

Hi all, My real goal is to read the values from a graph in GIF format, into some meaningful data structure but in order to get started I need to be able to read the colour of each pixel of the GIF in question. In order to test this i want to save the segment of the GIF i am reading to file for visual analysis, but am having trouble. a...

How to work with images(png's) of size 2-4Mb.

I am working with images of size 2 to 4MB. I am working with images of resolution 1200x1600 by performing scaling, translation and rotation operations. I want to add another image on that and save it to photo album. My app is crashing after i successfully edit one image and save to photos. Its happening because of images size i think. I ...