image-manipulation

Getting a particular Portion of Image (Picture)

北慕城南 提交于 2019-12-04 14:01:06
问题 I want to cut the the specific portion of the the picture and use it to compare the cropped image with another stored in the HDD. The problem is that I don't know how to get a specific section of the source image. I know the location (X,Y) of the image to be cropped. 回答1: This will load the original and create a cropped version starting at (0,0) and with dimensions of 64x64. Bitmap original = new Bitmap( @"C:\SomePath" ); Rectangle srcRect = new Rectangle( 0, 0, 64, 64 ); Bitmap cropped =

How to implement despeckle in OpenCV?

感情迁移 提交于 2019-12-04 13:42:40
问题 If histogram equalization is done on a poorly-contrasted image then its features become more visible. However there is also a large amount of grains/speckles/noise. using blurring functions already available in OpenCV is not desirable - i'll be doing text-detection on the image later on and the letters will get unrecognizable. So what are the preprocessing techniques that should be applied? 回答1: Standard blur techniques that convolve the image with a kernel (e.g. Gaussian blur, box filter,

Image processing on the iPhone

天大地大妈咪最大 提交于 2019-12-04 12:46:06
I would like to apply image processing on pictures taken on the iPhone. This processing would involve 2D matrix convolutions etc. I'm afraid that the performance with nested NSArrays would be pretty bad. What is the right way to manipulate pixel based images? Should I simply use C arrays allocated with malloc ? Have you looked at the Quartz 2D engine available in the iPhone SDK? Or perhaps Core Graphics? Apple has a nice overview document describing all the different imaging technologies available on the iPhone. Unfortunately there isn't anything as nice as ImageKit on the iPhone yet. I

what are my research areas for image processing project?

霸气de小男生 提交于 2019-12-04 11:44:54
For my final year project I'm doing a vehicle detail modification system. the system should be able to these following tasks. I'm using a size image of a vehicle taken from a fixed distance lets say from 5m. and different colors and rim images are stored I'm my application, that is is the basic idea. detect the tire and the alloy rim of the vehicle detect and measure the rim size of the installed rim apply a new alloy rim to the vehicle ( embed or put the alloy rim on top of the original image haven't decided yet) change color of the vehicle body apply tint colors to the vehicle windows

Manipulate WebP images in Python

▼魔方 西西 提交于 2019-12-04 11:06:46
问题 I'm looking for something like PIL (Python Imaging Library), which sadly doesn't support WebP images. I'd like to be able to do resizes and crops. Or at least convert to JPEG and then I can work it with PIL. 回答1: Take a look at: http://code.google.com/p/python-webm/ I was able to walk through the test file to see how they were doing it. 回答2: imagemagick's convert tool, version 6.5.7-8 or better, can manipulate WebP images. Also, Google provides an encoder and decoder for Linux, Windows and

jpegtran optimize without changing filename

十年热恋 提交于 2019-12-04 10:20:42
问题 I need to optimize some images, but not change their name. jpegtran -copy none -optimize image.jpg > image.jpg However, this seems to create an filesize of 0. When i do it to a different filename, the size is still exactly the same. 回答1: how about: jpegtran -copy none -optimize -outfile image.jpg image.jpg I'm not a shell expert by any means, but I think that with your original command, as soon as it is executed, the redirect is set up which overwrites your image.jpg. Then when jpegtran tries

Unsafe Pointer iteration and Bitmap - why is UInt64 faster?

倖福魔咒の 提交于 2019-12-04 10:11:46
I have been doing some unsafe bitmap operations and have found out that increasing the pointer less times can lead to some big performance improvements. I am not sure why is that so, even though you do lot more bitwise operations in the loop, it still is better to do less iterations on the pointer. So for example instead of iterating over 32 bit pixels with a UInt32 iterate over two pixels with UInt64 and do twice the operations in one cycle. The following does it by reading two pixels and modifying them (of course it will fail with images with odd width, but its just for testing). private

How can I change out an image using CamanJS?

喜欢而已 提交于 2019-12-04 06:32:16
I've got multiple images, and I'd like to load them each into a single <canvas> element at different points in time and then manipulate them using CamanJS . I can get the first image to appear like this: Caman('#canvas-element', '/images/one.jpg'); But then when I subsequently try to update that same element using the following code, it does not work. Caman('#canvas-element', '/images/two.jpg'); Is there some way to reset/clear/flush the canvas and load new image data into it, or do I really need to create separate <canvas> elements for each image I want to load? I'd prefer a single element

Save image from one format to another with php gd2

可紊 提交于 2019-12-04 05:27:13
问题 I have a database with a column filled with image binaries data. After I made some research I figuried out how to detect in which image format is the data. Lets say in of the records in my images column is in gif format, now I want to save it with php gd2 to jpeg format. Please, can someone tell me how can I do that? 回答1: If you only want to convert the image data to JPEG then all you need is imagecreatefromstring and imagejpeg. Basically: imagejpeg(imagecreatefromstring($gif_bindata), "temp

How to resize an image using PHP? [duplicate]

这一生的挚爱 提交于 2019-12-04 05:21:27
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Resize a picture to a fixed size How to resize an image in PHP? 回答1: Try the GD and Image functions, or - if you want something more than just that - a library like ImageMagick. 回答2: You may use imagemagick, call it via exec("convert ...") from php, copy it to the desired location and access it. 回答3: You can also do like I do and use a lightweight framework like flourishlib.com where everything is nicely wrapped