computer vision - Algorithm for "filling in" texture in a 2D image

I recall seeing a paper a while back for an algorithm that could automatically and seamlessly "graft" texture from parts of an image onto another part of an image.The approach was something along the lines of the following:You'd build up a databases of small squares of pixels (perhaps 8X8) from the parts of the picture that are present. You'd then pick an empty pixel (the "destination" for the texture graft) to fill in, and look for one of the squares in your database that most closely matches the surrounding pixels. You'd then color the empt...Read more

image manipulation - Processing Adobe Illustrator files

I have a set of AI files that I want to scale up. The AI files have a size of 200x200, and I want to scale them up to 400x400. As Illustrator does things with vectors it's not a problem, but now I want to do this for many AI files, and wanted to do it programmatically. Imagemagick's convert is able to take an "ai" file as input, but does not appear to be for vectors - when scaling down it works fine, but when scaling up, it gets a little blurry.What is a good way to batch on these?...Read more

photoshop - How do I determine if an image has been photoshopped?

Does anyone know how to tell if an image has been photoshopped? edit Specifically, I want to determine if regions or pixels in the image have been altered by photoshop. I'm not as interested in finding errors in the photoshop job (missing shadows, errors in reflections, etc)I seem to remember something like a high-pass filter that you could use that would determine the noise levels. Edited regions would have less noise, or at least changes in noise. I'm having a hard time finding information on this or other approaches.Thanks for your help!...Read more

image manipulation - How to convert XCF to PNG using GIMP from the command-line?

As part of my build process I need to convert a number of XCF (GIMP's native format) images into PNG format. I'm sure this should be possible using GIMP's batch mode, but I have forgotten all of the script-fu I used to know.My input images have multiple layers, so I need the batch mode equivalent of "merge visible layers" followed by "save as PNG". Also note that I can't install anything in ~/.gimp*/scripts/ — I need a self-contained command-line, or a way to install scripts in my source tree.Note that while this is similar to this question, I ...Read more

cgi - Draw images with warped triangles on a web server

The scenarioThe Flash front end of my current project produces images that a web server needs to combine into a video. Both frame-rate and frame-resolution are sizeable enough that sending an image sequence to the back end is not feasible (in both time and client bandwidth). Instead, we're trying to recreate the image drawing on the back end as well.Correct and slow, or incorrect and fastThe problem is that this involves quite a bit of drawing textured triangles, and two solutions we found in Python (here and there) are so inefficient, that the...Read more

calculate number of matches between two images using MATLAB vl_sift

I’m new to MATLAB. I’m using VL_Feat library. I’m trying to construct a code that can calculate number of matching points between two images. Up to now I know how to match two images. What I want to get is number of matching points. As an example “X key points found in image 1”“Y key points found in image 2”“z matches” Can anyone help me?im1Path = fullfile(vl_root, 'data', 'roofs1.jpg') ;im2Path = fullfile(vl_root, 'data', 'roofs2.jpg') ;im1 = imread(im1Path) ;im2 = imread(im2Path) ;[f1,d1] = vl_sift(im2single(rgb2gray(im1))) ;[f2,d2] = vl_sift...Read more

image manipulation - Drawing tools for a paint-like program in wxWidgets

I'm making a program in wxWidgets that has similar functionality to, say, MS Paint, but for more specific purposes.I understand various ways to create the pen/pencil object which commits a single pixel as you drag the mouse around. One thing I'm having trouble visualizing are some of the other common tools: rectangle, oval, line, etc. For these, you press the left mouse button to set an origin point, and as you drag your mouse around it temporarily renders an overlay of the shape on the canvas from the origin to the current mouse position, fina...Read more

image manipulation - Encode a JPEG File

I have a file of bytes that represent a .jpeg image. However, when I try to open the image, I get an error that indicates my file is of incorrect format. I'm a little thrown off by this as the bytes in the file look like they should work. In what I've read, the file lines up with the JPEG file format exactly. It's a decent sized image, so I won't post all the data, but the first couple lines look like this:ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff e1 00 58 45 78 69 66 00 00 4d 4d 00 2a 00 00 00 08 00 02 01 12 00 03 00 00 00...Read more

image manipulation - How to change background color of an eps file while converting it to jpeg or png

I am converting eps (Encapsulated PostScript) files to jpeg files with ghostscript. A sample command I use is:gswin32.exe -sDEVICE=jpeg -dJPEGQ=100 -dNOPAUSE -dBATCH -dSAFER -r600x600 -dGraphicsAlphaBits=4 -dUseCIEColor -dEPSCrop -sOutputFile=”a.jpeg” b.epsThe input eps files come with white backgrounds (I only have their clipping path). What I need to do is change this white background to another color in the output images, or it would be even better if I could make them transparent (output file format would be png). How can I do this?...Read more

iTextSharp image keep pixel dimensions?

Lets say I have an image that has a DPI of 72 and a width/height of 100px/100px. However when I add the image and render the PDF, the image that is displayed is bigger than 100px/100px. How can I ensure that the when adding the image to the PDF using iTextSharp that I keep the same pixel dimensions as the original image, in this case 100px/100px?...Read more

watermark - Size of Image after watermarking

I'm curios what happens to the size of the host image after an invisible watermark has been inserted. I'm guessing the size will increase but by how much?For example, the cover image to be inserted is 1kb and the host image is 2kb. Since your adding additional information the size will be 3kb after the embedding process?...Read more