image-processing

Read PPM Images in C

Hello!! Does anyone knows how can I read a PPM image into an array using C? Thanks. Best regards. ...

Image Library Software

Hi guys I have a need for an Image Library within my organization and I was wondering if anyone knows of any that they could recommend. It will need to be able to integrate with any number of our own solutions (meaning it will have a set of services or APIs that one can use for integration). Also I would be great if it had: facial reco...

Need a function to limit a line (known by its coordinates) in its length

Hello! I need a function which takes a line (known by its coordinates) and return a line with same angle, but limited to certain length. My code gives correct values only when the line is turned 'right' (proven only empirically, sorry). Am I missing something? public static double getAngleOfLine(int x1, int y1, int x2, int y2) { do...

Recognizing tetris pieces in C

Hello!! I have to make an application that recognizes inside an black and withe image a piece of tetris givem by the user. I read the image to analyze into an array. How can I do something like this using C? Thanks and best regards. ...

Shape descriptor

Hi, I have an image which is a binary mask, I want to characterize the contours of the black zones in the mask, I have found several funtionalities to detect the borders between both zones but only as a new image but what I want is the description of this border, not a new image. Is there any functionality in java advance imaging or in ...

Where can I find an unsharp mask for C#?

I have been trying to find a code snippet to do an unsharp mask in C# but cant find one that works or is complete. I found a PHP version but I would like to find one in C# before I go through all the hard work converting this from PHP. I am just a beginner. Can anyone point me in the right direction? ...

How can I get the corner points from a series of points in a square shape?

I'm trying to extract the corners of a square in an image, I've managed to extract all the pixels around the square as x,y coordinates. Problem is now that I need to filter those down to only 4 corners I'm not sure what the best approach would be. My first thought was to get the angles between each point and if the angle differs more th...

WPF: More efficient way of displaying quickly-changing images?

I'm using the Image control to display an 8-bit grayscale image that I process myself on a background thread. Once the image is processed, I set the Image.BitmapSource property to point to a new bitmap I create via BitmapSource.Create(). This is all well and good - until I have to rapidly reprocess the image and throw it back on screen. ...

Return a PHP page as an image...

I am trying to read a image file (.jpeg to be exact), and 'echo' it back to the page output, but have is display an image... my index.php has an image link like this: <img src='test.php?image=1234.jpeg' /> and my php script does basically this: 1) read 1234.jpeg 2) echo file contents... 3) I have a feeling I need to return the outpu...

Problem with PHPs getimagesize function

I am using PHPs GD extension for jpg image manipulation. The problem is that at one point I am using the getimagesize function to get image width and height. It works fine locally as well as one one of my remote servers but not on another of my remote servers. The problem seems to arise when using getimagesize for relatively large images...

Sharpen on a Bitmap using C#

I want to put a sharpen filter on an image. I have found a web with short tutorial. I tried to do it in C# so here is my code. Anyway, I tried to find out why it is not working. I do not know if I am doing something wrong, if yes, please advise me what to do to make it work as it should be. Thanks public static Bitmap sharpen(Bi...

Opencv Edge extraction

Hi all! I have an image and I want to create an adge histogram. I divide the image into 1100 image-blocks and try to find edge and its direction (horisontal, vertical, 45° diagonal, 135° diagonal or nondirectional) in each block. How I can extract that information about edges? Do you have any ideas? Regards! ...

Crop Image From User Input

I'm building a c# app to take photos of visitors for ID badges. I have found a c# wrapper for web cams so can take a snap shot easily, however I need to set the images to a certain number of pixels ideally with the persons head filling most of the area. I imagine the best way to do this is to allow the end user to drag out a rectangle ...

Modifying XMP data with C#

I'm using C# in ASP.NET version 2. I'm trying to open an image file, read (and change) the XMP header, and close it back up again. I can't upgrade ASP, so WIC is out, and I just can't figure out how to get this working. Here's what I have so far: Bitmap bmp = new Bitmap(Server.MapPath(imageFile)); MemoryStream ms = new MemoryStream()...

GDI+: how do you render a Graphics object to a bitmap on a background thread?

I'd like to use GDI+ to render an image on a background thread. I found this example on how to rotate an image using GDI+, which is the operation I'd like to do. private void RotationMenu_Click(object sender, System.EventArgs e) { Graphics g = this.CreateGraphics(); g.Clear(this.BackColor); Bitmap curBitmap = new Bitmap(@"ro...

Loading Images in J2ME?

I'm not so new to the concepts present on J2ME, but I'm sort of lazy in ways I shouldn't: Lately my app has been loading images into memory as they were candy... Sprite example = new Sprite(Image.createImage("/images/example.png"), w, h); and I'm not really sure it's the best way, but it worked fine in my Motorola Z6, until last night...

Java Imaging Framework

Is there any Open source or Commercial Java frameworks for doing image operations such as converting the images from one format to other and scaling the images etc. There should be no installation.Set of jars that are in classpath that will do the job. I have looked into the java-image-scaling library but it is having issues. Thanks i...

How do I center a rotated image using GDI+?

I'm trying to center a rotated image into a destination buffer using GDI+. The source buffer and the destination buffer are different sizes. The source buffer is the size of the image data: (width, height). The destination buffer is the size of the rectangle required to fit the entire rotated image: (rotatedWidth, rotatedHeight). This ...

C# Moving through an image in a spiral motion?

I want to move through the pixels of an image, not by going line by line, column by column in the "normal" way. But begin at the center pixel and going outward in a spiral motion. But I'm not sure how to do this. Any suggestions on how this can be done? ...

Merging gimp layers in a script

I keep e.g. buttons for my applications in GIMP xcf-files, with different elements of the image in layers. This provides a nice consistent view of the button and it is easy to replace stuff, such as the button background. From a single xcf I generate a number of "compiled" images, i.e images with different subsets of the layers merged. N...