imaging

Is there a way to resize an image using GPU?

☆樱花仙子☆ 提交于 2019-12-22 08:19:58
问题 Is there a way to resize an image using GPU (graphic card) that is consumable through a .NET application? I am looking for an extremely performant way to resize images and have heard that the GPU could do it much quicker than CPU (GDI+ using C#). Are there known implementations or sample code using the GPU to resize images that I could consume in .NET? 回答1: Have you thought about using XNA to resize your images? Here you can find out how to use XNA to save image as a png/jpeg to a

Merge png images into single image in WPF

北城以北 提交于 2019-12-22 05:27:14
问题 I'm looking for a way to Merge some PNG tile images into a big image. So I search and found some links. This is not answered properly. This is not tiling, it's good for overlaying images and this is not using WPF. So I'm making this question. Problem Definition: I have 4 PNG images. I want to merge them into a single PNG image, like this ------------------- | | | | png1 | png2 | | | | ------------------- | | | | png3 | png4 | | | | ------------------- Question: What is the best and efficient

DICOM Slice Ordering

限于喜欢 提交于 2019-12-20 08:45:07
问题 I have a basic question for the DICOM protocol. I know how I can calculate the orientation labels of every slice of a DICOM image (A,P,L,R,H,F). But when I got for example an Axial slices with numbers from 0001 to 0024 I need to know if the slice order is from Head to Feet or from Feet to Head. How can I calculate that ? 回答1: Patient Position (0018, 5100) will tell you if the patient was scanned head-first supine, feet-first prone, head-first prone, etc. Instance Number (0020, 0013), also

Image Zoom using javascript?

こ雲淡風輕ζ 提交于 2019-12-19 04:12:32
问题 Has anyone got to some good code to zoom into an image using javascript? I know I could just resize it etc but was being lazy and looking for something clever to zoom to different levels, move around when zoomed etc 回答1: This really depends on what quality you are after. If you need a hires hiquality image with detailed zoom levels and proper interpolation you will need to write a backend service to serve up zoomed portions of your images. If you have no care for quality or speed, you could

Effective way of making negative of image without external dlls

六眼飞鱼酱① 提交于 2019-12-18 17:27:46
问题 That is the solution to make a negative from a image in C# Windows Forms without any dlls and in a effective, fast way? 回答1: The best way to do this is directly accessing the pixels with bitmap data. Just to add some timing details: Performing Negate on an 8 Megapixel Image (on a 2.4 Ghz Core 2 Duo): SetPixel (~22 seconds) - 220 Times slower Color Matrix, Matajon's method below (~750 milliseconds) - 7 times slower Directly accesing the bitmap data (~100 milliseconds) - Fastest So, if you can

Effective way of making negative of image without external dlls

只愿长相守 提交于 2019-12-18 17:27:08
问题 That is the solution to make a negative from a image in C# Windows Forms without any dlls and in a effective, fast way? 回答1: The best way to do this is directly accessing the pixels with bitmap data. Just to add some timing details: Performing Negate on an 8 Megapixel Image (on a 2.4 Ghz Core 2 Duo): SetPixel (~22 seconds) - 220 Times slower Color Matrix, Matajon's method below (~750 milliseconds) - 7 times slower Directly accesing the bitmap data (~100 milliseconds) - Fastest So, if you can

“IOError: decoder zip not available” : Ubuntu Python PIL

微笑、不失礼 提交于 2019-12-18 04:42:31
问题 I am trying to get the sample heatmap.py running from: http://jjguy.com/heatmap/ #image.py import heatmap import random if __name__ == "__main__": pts = [] for x in range(400): pts.append((random.random(), random.random() )) print "Processing %d points..." % len(pts) hm = heatmap.Heatmap() img = hm.heatmap(pts) img.save("classic.png") and I get this error: Processing 400 points... Traceback (most recent call last): File "/home/ec2usr/workspace/image/image.py", line 14, in <module> img.save(

Easiest way of saving wpf Image control to a file

 ̄綄美尐妖づ 提交于 2019-12-17 10:49:34
问题 I have a Image control inside my wpf application, which has a large image inside of it, but the control itself is only 60x150, this means it only shows a certain portion of this image. What is the easiest way of saving the visible portion to a file? Thank you for your help. [EDIT] I ended up using code found here (which I've not been able to locate before posting here)... Grid r = new Grid(); r.Background = new ImageBrush(image2.Source); System.Windows.Size sz = new System.Windows.Size(image2

Image Resize C#,VB.NET Opensource Library

强颜欢笑 提交于 2019-12-13 18:47:50
问题 Any one point me on good direction on how to resize a jpg image to exactly particular size (Both File size and pixel size Ex. 148 x 72 px , 300 KB ). To Acheive this, Quality of images can be adjusted. It may a .NET library /code but it should be free for commercial use / open source. I want it in either C# or VB.NET as library. 回答1: You can use the Graphics.DrawImage to resize the image. Then you can adjust the quality by passing a parameter to the Bitmap.Save method (more info). I don't

Comparing two JPEG IMAGES and displaying differences

∥☆過路亽.° 提交于 2019-12-13 16:57:25
问题 Images are of the same object taken at different time intervals. Software solutions - to be implemented in hardware. High rate of performance most important in hardware implementation 回答1: I believe Perceptual Diff does what you want... http://pdiff.sourceforge.net/ 回答2: Despite the fact the question seems to be after hardware and some kind of technique rather than a tool, for the sake of posterity it's worth mentioning that you can do this with Beyond Compare plugins. Not free but worth the