image-processing

imagecreatetruecolor fails with 1536X1962 but not smaller diminsions

I have narrowed down my problem to show the size of the file matters. I don't know when the file is to big however. How can I catch the error. A 1.1mg file causes imagecreatetruecolor to bail but it chuggs along just fine when processing a 688k file. Thanks ...

OpenCV - How does it handle color profiles?

I have a jpeg. Its color profile is sRGB, of course. I load it into "image" and call cvCvtColor(image, gray, CV_BGR2GRAY); to convert it to grayscale. When I step into that routine in the debugger, I find it multiplying pixels by these values: #define cscGr_32f 0.299f #define cscGg_32f 0.587f #define cscGb_32f 0.114f Waaaai...

CodeIgniter Image Manipulation (Resize & Watermark)

I'm hoping someone can help me. I'm trying to upload an image via a form, resize it to 600px, create a 100px thumbnail and then add a watermark image to the 600px version, but the code below is just creating two versions of the original image. $image = $this->upload->data(); $resized = base_url()."images/artwork/".$image['orig_name']; ...

Detecting center point of cross using Matlab

Hello, I have an image as shown above. Is it possible for me to detect the center point of the cross and output the result using Matlab? Thanks. ...

Line scanning openCV

below is a very simple code segment, but I am not able to understand why it is cribbing, can you please tell me what the error means: CvSize iSize; iSize= cvGetSize(I1); CvLineIterator *iter ; CvPoint p1,p2; long *arrH = new long[iSize.height + 1]; long *arrV = new long [iSize.width + 1]; for( int i=0; i<=iSize.height;i++) { ...

general purpose file preview component

Is anyone aware of a good, general purpose file preview component for linux/Qt/GTK/c/C++ applications? Specifically, I'm looking for a component that I could embed in my application that would allow a broad range of file types (text files, multimedia, etc.) to be previewed without the need for original applications to be installed. The ...

RoR - Images in DB tables?

I want a user to upload multiple images (+ thumbs) and give a description about their pics. What do i need to do to create this the ruby way? Do i manually create the tables (and which are these) or what gem do i require? I want to store the file physical on a path and store the link (+ attr. information) in the db (if it is the best s...

How can I render a web page on the server (no GUI) for printing?

I'm trying to print pages pragmatically with a PHP script, to an office printer. Here's what I've got so far: I have a printer installed on the server, and I can send jobs to it with PHP via the command line's print command. I can also write plain text files with my PHP script, and then add them to the print cue. So printing PHP genera...

JS/jQuery Image Editor

Hello, has anyone stumbled upon image editor done either in pure JS, or jQuery - that kind like CKEditor has? I'm looking for piece of code, that adds handles to image, so you can resize it, or even drag image around, as you wish. Thank you. Edit: rephrased. ...

Algorithm for minimizing pixel stretching effect .

Hi, I am looking algorithms or techniques so that i can minimize the pixel stretching effect for a given image. I am not looking for any tool. ...

Pixel chains from run length encoding

I've been banging my head for a long time on this one I am doing imaging. So far I've binarized my images, meaning that from a grayscale image, every pixel under a certain value are dropped. This gives me only some regions out of the original image with a lot of "zero pixels" all around those regions. Next I've run length encoded my re...

Looking for image distortion algorithm

Recently I saw demonstration of image distortion algorithm that preserves some objects in image. For example changing weight/height ratio but preserving people faces in image to look realistically. The problem is i can't find the reference to that demonstration neither I know the name of such transformations. Can anybody point me to a ...

Choosing a thumbnail from an external link

I am trying to build a script that retrieves a list of thumbnail images from an external link, much like Facebook does when you share a link and can choose the thumbnail image that is associated with that post. My script currently works like this: file_get_contents on the URL preg_match_all to match any <img src="" in the contents Wor...

Detect an object in image using IMAGEMAGICK

Hello Everyone! I have an image with Gray Background and 'CUP' in center of it... I want to detect the boundaries of the cup in this image.. After detecting CUP I want to extract the CUP from the image using IMAGEMAGICK.. Note I have many images with different objects (like CUP) in the center and with different background color .. So I ...

How to apply Image Processing to OpenGL?

Sorry if the question is too general, but what I mean is this; in OpenGL, before you perform a buffer swapping to make the buffer visible on the screen, there should be some function calls to perform some image processing. I mean, like blur the screen, twisting a portion of the screen, etc. or performing some interesting "touch up" like ...

How does PDF417 barcode decoding recover from damaged labels?

I recently learned about PDF417 barcodes and I was astonished that I can still read the barcode after I ripped it in half and scanned only a fragment of the original label. How can the barcode decoding be that robust? Which (types of) algorithms are used during encoding and decoding? EDIT: I understand the general philosophy of introdu...

Reducing the file size of a very large images, without changing the image dimensions

Consider a application handling uploading of potentially very large PNG files. All uploaded files must be stored to disk for later retrieval. However, the PNG files can be up to 30 MB in size, but disk storage limitations gives a maximum per file size of 1 MB. The problem is to take an input PNG of file size up to 30 MB and produce an...

Will Perl be the bottleneck in this kind of image processing?

The processing I have in mind is this: there are thousands of png files each of them should be loaded, and its pixels accessed each pixel's channels will be processed in some way, and then written to a binary file I was thinking of using some sort of module, like ImageMagick wrappers, or some other wrapper for a C image processing ba...

Fast way to get the bounding rectangle of a flood fill

I need to perform a flood fill on a region of an image. However I do not actually need the resulting image, I only need to know the smallest rectangle containing all pixels that would be changed by the flood fill. Is there a variant of a flood fill algorithm that can compute this rectangle more cheaply than doing a full flood fill? Ex...

How to extract the number of control points from Hugin.

Hi, Is there any way to extract the controlpoints calculated using Panomatic or any other Control Point detector? All I need is to compare two images based on the number of control points and tell which two images are similar. I need to do this in Command Line. ...