image-processing

Downloading images

I have a requirement where a user can specify a url http://www.mysite.com/displaythread.php?t=863 He then specifies total no of pages in that thread and the software automatically loops through all pages and downloads images For eg: If no of pages is 20, then the pages looped will be in following manner http://www.mysite.com/display...

Image processing erosion

Please Can anyone tell me what happen when i erode an image with a structure element(SE) that has zero center example [0 0 1].Because i learned that erosion is the intersection of all placement of an image (A0 Intersect A1 ..An) and because the center is zero => A0 is Phi which means the erosion will be nothing (black image) which is rea...

How can I crop/scale user images so I can display fixed sized thumbnails without skewing and stretching?

I'm working on allowing users to upload profile pictures for my site. The classic example of what I'm trying to avoid is plentyoffish.com where each users image is skewed and looks very ugly: So, how can I progmatically crop/create standard sized versions of an image without the skewing demonstrated above? ...

Remove white backgrounds from images

Hello, I have some product photos, from which I would like to remove the white background. An example: Is there a nice library or a manual way to do it with Cocoa or C? For which keywords (image processing methods) do I have to search? ...

Curve fitting unsorted points on a plane

Question: How do you fit a curve to points on a plane if they aren't single valued? For the example shown, how would one fit a curve (like the black one) to the noisy blue data? It's similar to spline smoothing, but I don't know the order of the data. Matlab would be preferred, but pseudocode is fine. Or a pointer to what the correc...

PHP/GD - Cropping and Resizing Images

I've coded a function that crops an image to a given aspect ratio and finally then resizes it and outputs it as JPG: <?php function Image($image, $crop = null, $size = null) { $image = ImageCreateFromString(file_get_contents($image)); if (is_resource($image) === true) { $x = 0; $y = 0; $width = imagesx($imag...

Image resizing web service

Does someone know a good web service to resize images ? Either an open source (PHP/Python/Ruby) application, or a company providing a web service api. ...

How to flatten a fish eye picture (with python)?

I've found programs to turn fish eye pictures into flat ones. I'd like to learn the process behind the scenes. Can someone share their knowledge about the technique? ...

Creating dynamic images with WSGI, no files involved

Hello there fellow SOers, I would like to send dynamically created images to my users, such as charts, graphs etc. These images are "throw-away" images, they will be only sent to one user and then destroyed, hence the "no files involved". I would like to send the image directly to the user, without saving it on the file system first. W...

How do you scale an image for print without degrading the quality?

I was wondering how would you print an image that's scaled three times its original size without making it look like crap? If you change the dpi to 300 and print it'll look like crap. Is there a way to convert it gracefully? ...

What algorithm could be used to identify if images are the "same" or similar, regardless of size?

TinEye, the "reverse image search engine", allows you to upload/link to an image and it is able to search through the billion images it has crawled and it will return links to images it has found that are the same image. However, it isn't a naive checksum or anything related to that. It is often able to find both images of a higher res...

Image upload error in php while using the function imagecreatefromjpeg()

Hi I am resizing an image that is uploaded and I am creating a new image after resize using the function imagecreatefromjpeg() I have been able to successfully resize images of huge dimensions as well. But when I am try and upload an image having a size above 1.5 MB or so, I get the following error Fatal error: Allowed memory size o...

Get Bytes from an int to avoid bit shifting fun - Java (Median Filtering)

Hi All, I'm trying to perform a Median filter on an image in Java but it's terribly slow. Firstly, if any of you know of a standalone implementation I could use it would be fantastic if you could let me know. I'm implementing on Android, trying to replicate a small part of the JAI. In my method I take each pixel, extract the R,G & B va...

How do I convert a MATLAB image processing program to java?

I've written an image processing program in MATLAB which makes heavy use of the MATLAB Image Processing Toolbox, especially the morphological operations (imopen, imclose) as well as imadjust. We do a lot of spline fit operations and medfilt2 and medfilt1 a lot also. We have a client who wants us to convert this program to Java. I would...

Bitwise operations on a png and bmp give different results? (Same 32 bit ARGB representation)

Hi all, I'm trying to replicate some image filtering software on the Android platform. The desktop version works with bmps but crashes out on png files. When I come to xOr two pictures (The 32 bit ints of each corresponding pixel) I get very different results for the two pieces of software. I'm sure my code isn't wrong as it's such a...

Save Image Preserving Resolution in C#

I am trying to crop an image. I have found multiple ways to do this, however none are performing how I would like. Once the image is cropped, I am sending it to a PDF generator. If I send the normal jpg, it works fine, however if I crop the image, it does not come through to the PDF in the correct size. I think it might be to do with res...

Near-Duplicate Image Detection

What's a fast way to sort a given set of images by their similarity to each other. At the moment I have a system that does histogram analysis between two images, but this is a very expensive operation and seems too overkill. Optimally I am looking for a algorithm that would give each image a score (for example a integer score, such a...

Reading Image from AJAX response

I have a url that when requested will return an image. I want the url to be requested through an AJAX request. The ajax request returns binary data which is what is being deplayed. but i want the actual image displayed not the binary data. Am using php on the server side and i have set the below headers: header("Cache-Control: no-cache,...

Resize large images in App Engine

I've got an app on Google App Engine that will accept image uploads from users. The problem that I envision is that users will upload these images directly from their cameras, and file sizes are often greater than 1MB, which is the limit for the image API (which would be used to resize the images). What's the best way to accept the uplo...

How would you align pictures?

I have a bunch of gif files which would be much more useful as animation. Unfortunately, they are not exactly the same size, and main features (country borders) shift a bit from picture to picture. NASA Vision Workbench seems like solution to my problem, but I would love to get something a bit simpler. ...