image-manipulation

Reading Character from Image

邮差的信 提交于 2019-12-04 04:42:12
I am working on an application which requires matching of numbers from a scanned image file to database entry and update the database with the match result. Say I have image- employee1.jpg. This image will have two two handwritten entries - Employee number and the amount to be paid to the employee. I have to read the employee number from the image and query the database for the that number, update the employee with the amount to be paid as got from the image. Both the employee number and amount to be paid are written inside two boxes at a specified place on the image. Is there any way to

How can I convert between RGB565 and RGB24 image formats in MATLAB?

£可爱£侵袭症+ 提交于 2019-12-04 04:42:10
I am getting an RGB matrix from a microprocessor that outputs an image in RGB565 format. I want to read this into MATLAB, convert it to RGB24 format, and output the image. How do I do this? You first have to read your data from the text file into a matrix in MATLAB. Since I don't know what format your text file is in, I can only suggest that you will probably need to use the function fscanf to read in all of your values (probably of type uint16 ), then you will likely have to reshape the values into an N-by-M image matrix using the function reshape . Let's assume you've done all that, and you

Reverse Spectrogram A La Aphex Twin in MATLAB

扶醉桌前 提交于 2019-12-04 04:18:16
I'm trying to convert an image into an audio signal in MATLAB by treating it as a spectrogram as in Aphex Twin's song on Windowlicker . Unfortunately, I'm having trouble getting a result. Here it what I have at the moment: function signal = imagetosignal(path, format) % Read in the image and make it symmetric. image = imread(path, format); image = [image; flipud(image)]; [row, column] = size(image); signal = []; % Take the ifft of each column of pixels and piece together the real-valued results. for i = 1 : column spectrogramWindow = image(:, i); R = abs(ifft(spectrogramWindow)); % Take only

Save OpenGL screen pixels to PNG using libpng

旧时模样 提交于 2019-12-04 03:11:17
I've been using SOIL to save images as BMP, but it turns out that SOIL (or stbi to be more specific) saves ~5MB images (which is about 1366x768 resolution image or more) which is quite insane. Original BMP saving code ( NOTE Everything is done in the render function): uint8_t *pixels = new uint8_t[w * h * 3]; // copy pixels from screen glBindTexture(GL_TEXTURE_2D, screenTex); glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, w, h); glPixelStorei(GL_PACK_ALIGNMENT, 1); glReadPixels(0, 0, w, h, GL_RGB, GL_UNSIGNED_BYTE, (GLvoid *)pixels); // invert pixels (stolen from SOILs source code) for (int

SVG to JPG / PNG

别等时光非礼了梦想. 提交于 2019-12-04 02:50:43
Is there any working module to convert a SVG image into a pixel format like JPEG or PNG ? Take a look at the Batik toolkit. Specifically the rasterizer: http://xmlgraphics.apache.org/batik/tools/rasterizer.html If you're using PEAR you can the XML_svg2image package ( http://pear.php.net/package/XML_svg2image/ ). If not you should take a look at ImageMagick command line tool ( http://www.imagemagick.org/script/command-line-tools.php ). The convert program is quite simple to use : http://www.imagemagick.org/script/convert.php#usage If you have imagemagick installed (the tool, not sure how it

Multiple Image Resizes at once in Codeigniter , won't work

给你一囗甜甜゛ 提交于 2019-12-04 02:29:57
问题 I am trying to upload images and re-size them in different dimensions within the same function. but what happens is that only one re-size works and the others don't . My code is: function do_upload() { $this_user = $this->auth->info;if(!is_dir('./uploads/'.$this_user->username)){ mkdir('./uploads/'.$this_user->username); mkdir('./uploads/'.$this_user->username.'/photos'); mkdir('./uploads/'.$this_user->username.'/photos/master'); mkdir('./uploads/'.$this_user->username.'/photos/small'); mkdir

Can I create a PDF which will always opens at zoom level 100%?

天大地大妈咪最大 提交于 2019-12-04 01:39:11
问题 I am running into an issue with PNG to PDF conversion. Actually I have big PNG files not in size but in contents. In PDF conversion it creates a big PDF files. I don't have any issue with its quality, but whenever I try to open this PDF in PDF viewer, it opens in "Fit to Page" mode. So, I can't see the created PDF in the initial view, but I need to zoom it up to 100%. My question is: can I create a PDF which will always open at zoom 100% ? 回答1: You can possibly achieve what you want with the

Non-Affine image transformations in .NET

笑着哭i 提交于 2019-12-04 01:13:13
问题 Are there any classes, methods in the .NET library, or any algorithms in general, to perform non-affine transformations? (i.e. transformations that involve more than just rotation, scale, translation and shear) e.g.: (source: last100.com) Is there another term for non-affine transformations? 回答1: All of the example images you posted can be done with a Quadrilateral Distortion. Though I cant say for certain that a quad distort will cover ALL non affine transforms. Heres a link to a not so good

PHP Image Resize & My upload script

ぃ、小莉子 提交于 2019-12-03 21:39:12
I have seen a lot of examples, but I am not sure how it can tie into the upload script i currently have. Could someone please explain how I might be able to use ImageMagick or something of the like to resize an uploaded image to a fixed width while keeping the w:h ratio? I have googled and looked at over 150 web pages but none of them really give an example that i feel applies to my situation. Any help would be appreciated. Here is my code: // Include Extension finder function. include_once 'find_extension.php'; // Function Gathers the Input Name, Store Number and Picture Number. The picture

Checking image feature alignment

≡放荡痞女 提交于 2019-12-03 21:28:19
I have written my own software in C# for performing microscopy imaging. See this screenshot . The images that can be seen there are of the same sample but recorded through physically different detectors. It s crucial for my experiments that these images be exactly aligned. I thought the easiest would be to somehow blend/substract the two bitmaps but this doesn't give me good results. Therefore I am looking for a better way to do this. It might be useful to point out that the images exist as arrays of intensities in memory and are converted to bitmaps for on-screen painting to my self written