Click here to Skip to main content
15,881,172 members
Everything / Multimedia / Image Processing

Image Processing

image-processing

Great Reads

by Darko Jurić
SIR Particle Filter brief tutorial with samples in C#
by V.
Case study on how to solve a complex problem by dividing it into smaller problems.
by J. Broun
An article aimed at intermediate coders on decoding Stardent Corp.'s AVS Bitmap Image format.
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search

Latest Articles

by Hans-Peter Kalb
C# library for reading and writing EXIF tags in JPEG, TIFF and PNG image files
by Huseyin Atasoy
An image classifier / tagger based on convolutional neural networks. Now more than 10 times faster with the Intel MKL support.
by napuzba
How to use pointers when processing images in C#
by dynamichael
Build an oct-tree from a color palette for a fast nearest color search

All Articles

Sort by Score

Image Processing 

27 Apr 2015 by Darko Jurić
SIR Particle Filter brief tutorial with samples in C#
14 Mar 2016 by V.
Case study on how to solve a complex problem by dividing it into smaller problems.
27 May 2013 by Sergey Alexandrovich Kryukov
I can give you a simple idea: this is very difficult, nearly impossible.I can tell, because I have a very long experience working with photo editing, using different software, including very best products. Many people are very impressed with background removal/replacement feature. But I was...
19 Dec 2011 by J. Broun
An article aimed at intermediate coders on decoding Stardent Corp.'s AVS Bitmap Image format.
25 May 2019 by dynamichael
Build an oct-tree from a color palette for a fast nearest color search
9 Feb 2011 by Espen Harlinn
WPF has impressive rendering capabilities, and by using RenderTargetBitmap Class[^] you can leverage that functionality to create bitmap images. If you want to go into sub-pixel accuracy then Anti-Grain Geometry[^] may be just what you need. It's a C++ library, but you can access the...
17 Mar 2011 by Espen Harlinn
Here is a few articles on the subject:Thumbnailer HTTP Handler[^]Thumbnail Image Viewer Control for ASP.NET 2.0[^]An ASP.NET thumbnail solution[^]Generic Image Handler Using IHttpHandler[^]At least the subject is similar enough to provide a starting point for your task...
4 May 2011 by Pete O'Hanlon
Directly speaking, you can't. When you think about it, you'll see why - your browser is sandboxed to prevent it getting unsecured access to your machine.There are a couple of potential solutions, but they are hackish, unsecure, and rely on your clients only using Windows machines.The...
20 Jul 2011 by ankur.mu
Here is the code to this :public static Bitmap ColorToGrayscale(Bitmap bmp){ int w = bmp.Width, h = bmp.Height, r, ic, oc, bmpStride, outputStride, bytesPerPixel; PixelFormat pfIn = bmp.PixelFormat; ColorPalette palette; Bitmap output; ...
30 Oct 2011 by Espen Harlinn
Take a look at:http://en.wikipedia.org/wiki/Face_detection[^]There are some papers at the bottom that should be of some help on how you can proceed with this.Best regardsEspen Harlinn
4 Sep 2013 by Grasshopper.iics
You would never want to use another photo editor in your AIO again
30 Apr 2019 by Apriorit Inc, Semyon Boyko
The approach that allows you to make a neural network analyze the current frame while remembering the state of previous frames
8 Feb 2011 by Abhinav S
You might find this blog[^] interesting.
2 Apr 2011 by CPallini
This CodeProject's article: "Image Recognition with Neural Networks"[^] should give you some insight.:-)
27 Apr 2011 by Manfred Rudolf Bihy
Please have a look here: Draw a Smooth Curve through a Set of 2D Points with Bezier Primitives[^]. The article is for C# but since you didn't specify any language I thought I just post this.Best regards,-MRB
11 May 2011 by BobJanova
If you're going to use the unsafe approach, don't use GetPixel. The whole point of the unsafe approach is to bypass the slow managed API. You should be using *scan++ (if you are reading whole rows from the rectangle you selected, which you seem to be).As for the error, I guess Get/SetPixel...
1 Feb 2012 by Sergey Alexandrovich Kryukov
Basically, you need to use WIA, please see:http://en.wikipedia.org/wiki/Windows_Image_Acquisition[^],http://en.wikipedia.org/wiki/Image_and_Scanner_Interface_Specification[^],http://en.wikipedia.org/wiki/TWAIN[^] (twain is the older standard, still...
22 Feb 2012 by Sergey Alexandrovich Kryukov
There are enough of ready-to-use utilities and libraries, such as Open Source and multi-platform ImageMagic. Please see:http://en.wikipedia.org/wiki/ImageMagick[^],http://www.imagemagick.org/[^].As it comes with command-line utilities, you can easy write a batch file of one or two lines,...
31 May 2012 by enhzflep
A couple of things spring to mind for such a task.Create a copy of the image and convert to grey-scaleRun an edge-detect filter on it (this will highlight the differences in contrast at feature boundariesI vaguely recall reading of an adaption to the Hough transform that allows circles to be...
13 Aug 2012 by Sergey Alexandrovich Kryukov
I found that SWT is available in CCV, an open-source Computer Vision Library:http://libccv.org/doc/doc-swt/[^].You can download the source code and learn how it works, to write it in C# or make a translation.Alternatively, you can compile the code into a native DLL and use it in your...
26 Apr 2013 by Sergey Alexandrovich Kryukov
Why not using either EuclideanColorFiltering (that was my first idea) or, say, YCbCrFiltering instead?Please...
12 Jun 2013 by Sergey Alexandrovich Kryukov
This is quite a complex problem, but I think you can solve it if you study the subject properly and put some decent effort. I hope you goals really worth the effort, and, additionally, you could potentially help many other people. So, thank you very much for your interest in this work and your...
21 Sep 2013 by OriginalGriff
Well, no, that's not a smart way - for a couple of reasons:Firstly, it'll probably not show any image at all because it sits in a loop changing them and never gets a chance to do the Paint event for anything...Secondly, because if it did show anything, it would be replaced so quickly that...
1 Dec 2013 by Bill_Hallahan
First some background:You wrote:"In an 24bpp type, these values are scanned then converted to byte then assigned to the bitmap image."Every scanner I have seen in a previous job, which included scanners by Canon, HP, Konica Minolta, Toshiba, and more, all scanned color images that...
16 Feb 2016 by Jochen Arndt
JPEG uses lossy compression while Portable Network Graphics - Wikipedia, the free encyclopedia[^] uses a lossless compression (DEFLATE algorithm). Therefore, it has no quality parameter (quality is always 100 %).However, the size of PNG images may be optimised by some methods like using a...
4 Oct 2016 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
We will discuss a problem that I recently came across while working with images in coding.
16 Jan 2011 by Espen Harlinn
I'm guessing here and "image as list of integers" may be your problem - you need to think of the compression result as a stream of bits - not a sequence of integers.RegardsEspen Harlinn
16 Jan 2011 by Sergey Alexandrovich Kryukov
What do you consider an image size? If you hope that this is a size of integer multiplied by the number of points; and your persistent presentation would match it, then you hope in vain. The persistent size will always be more -- for a good reason.If you save using any kind of text-based...
10 Mar 2011 by Henry Minute
You can do this by use of ImageAttributes.Here[^] is an article that uses VB.NET, but the code is almost directly translatable to C#.
27 Jun 2011 by TheyCallMeMrJames
Asma, this is no small task and the question you're asking isn't really specific enough for this forum.You can make use of libraries such as AForge.net[^] which will have you on your way down this kind of development, but you'll have to do the heavy lifting on your own.Facial recognition...
18 Aug 2011 by Jibrohni
Hi all, I have two images on my form, one is a .jpg the other is a .png. What I'm doing is overlaying them to try and create one image that I can then save to a file. I've done a lot of searching on the net but can't seem to find a simple way to do it. I've got the code below which I think...
30 Oct 2011 by Mehdi Gholam
Both Java and .net have wrappers for OpenCV.So the question is really which language you are more comfortable working in.
6 Nov 2011 by Prerak Patel
You can try something like thishttp://www.dotnetcurry.com/ShowArticle.aspx?ID=91[^]http://www.dotnetcurry.com/ShowArticle.aspx?ID=409[^]
20 Nov 2011 by danlobo
I got what A.J tried to say. It's about implementing IDisposable in LockBitmap.Basically, it involves changing:public class LockBitmapto: public class LockBitmap : IDisposableThe constructor:public LockBitmap(Bitmap source){ this.source = source;}to:public...
19 Nov 2011 by Sergey Alexandrovich Kryukov
I guess not. Did you see this: http://cims.nyu.edu/~na712/mocap/demos.html[^]?—SA
29 Jan 2012 by Sanju Sanju
Hi All,In my application i need to display some large images which are having size of about 800MB.When im trying to read the Image Using Image img = Image.FromFile(filepath); its showing OutOfMemory error. Please help me. How to read large Images?
20 Mar 2013 by Sergey Alexandrovich Kryukov
The situation is not easy at all. Here is some idea:Take a computer which has enough memory where you can read it. Important: on this stage, you should use uncompressed images. Break the big image into N x M of smaller fragments of some easily managed size and safe these fragments as...
10 Apr 2012 by OriginalGriff
Try disposing of old bitmaps: each time you call ProcessBitmap you build two more (one with the new Bitmap at teh beginning, and another with the bmap.Clone at the end).Use Dispose on _currentBitmap before you assign the new value, and don't do the Clone at all since it really doesn't do...
1 Jun 2012 by nv3
This requires some more preprocessing steps. Not easy to describe in a quick answer. it is more like a full image processing project. What you have to do in my opinion is: * apply a pepper and salt filter to get rid of the structure (median filter) * apply a 2D edge finder (Canny...
28 Jun 2012 by email2gtc
I am creating an application to recognize books by its spine. What I want to do is take picture of a book spine and match it with a database of books.I was hoping to use pattern matching and template matching for this. First i was hoping to search book by template matching using templats of...
21 Sep 2012 by CPallini
I would choose option 2 (even if you choose option 1, you probably have to segment the whole process, because, performed as a single step, it would require a huge amount of memory).As about point (3) I believe you can but, probably you don't need. I mean you should split the processing time...
25 Oct 2012 by YvesDaoust
You can plug the C++ functions into your Java class as methods. The two languages share much of the syntax and semantics.The Java compiler will tell you where you should adapt the code.When all compiles, if you don't get the same behavior, you can step-by-step the two versions in...
1 Nov 2012 by Santhosh G_
If GDI functions can be used, you can prepare a memory Dc and attach the captured image to the memory DC. Then Draw the timestamp text to the memory DC, using TextOut or DrawText. After Textout to the memory DC, Read bitmap and it will provide the captured image with the text.1) Prepare a...
12 Nov 2012 by OriginalGriff
The first thing to do is to make sure you have established communications with the camera.Assuming you can talk to it in some way already, the manual is pretty clear about what you have to do. To take a picture:Send the camera a sequence of 5 bytes: 0x56 0x00 0x36 0x01 0x00It will talk...
4 Feb 2013 by Sergey Alexandrovich Kryukov
Please see my comment to the question.It is well-known that such problem does not have a general solution at all, at least, not a solution in the traditional mathematical sense of this word.There is a branch of mathematics devoted to some classes of so called ill-posed problems. Most...
6 Mar 2013 by Patil Pradip
1) I want read text that is present within the image file. 2) This activity done without using external(third parity) dll or control3) And also suggest me for with technology is best for this task.
27 Apr 2013 by Zoltán Zörgő
You could start here: https://code.google.com/p/number-regnization/[^]
12 Jun 2013 by R.Lohmueller
hello together,can anyone give me hints to (c++/mfc) source to construct an image with a moving webcam.my father has a debility of sight and I'd like to develop an application for him that "scans" a newsletter column while moving a webcam over it. I already get the image of the webcam...
10 Oct 2013 by Sergey Alexandrovich Kryukov
Please see this CodeProject article: BoofCV: Real Time Computer Vision in Java[^].—SA
3 Dec 2013 by Sergey Alexandrovich Kryukov
Most or all of the tasks you listed would not really require any library except the part of .NET FCL, System.Drawing.The library I would advise the most is AForge.NET:http://en.wikipedia.org/wiki/AForge.NET[^],http://www.aforgenet.com/[^].This library offers a lot more than you need...
9 Jan 2014 by Matt T Heffron
multiply by 255:grayScale.SetPixel(xCoordinate, yCoordinate, Color.FromArgb((int)(255*redColor), (int)(255*greenColor),(int)(255*blueColor)));
20 Jan 2014 by MCY
Search the web on pseudocoloring[^] Pseudocolor is derived from a grayscale image by mapping each intensity value to a color according to a table or function.You should create a mapping that will connect your grayscale intensity (say 0 to 255 for 8 bit per pixel) to a spectrum color intensity...
6 Mar 2014 by Sergey Alexandrovich Kryukov
Thank you for answering my question.Maybe you don't have sufficient university culture. At my time, we took the most ideas from fellow students of different specialties as we communicated a lot on different scientific topics and exchanged a lot of interesting ideas, discussed out problems,...
4 May 2014 by Legor
You can't just directly calculate the distance between two pixels in real world units. You will need some more information which may be obtained in several ways: - Considering the person is passing the camera almost horizontal (not walking away from or up to the camera) you may use the...
5 Jun 2014 by Sergey Alexandrovich Kryukov
Don't ever draw anything on a PictureBox. This is one of the common mistakes of many beginners confused by this almost useless class, only designed to simplify the most basic graphic chores, like presenting a static image. Even though manipulating with PictureBox is possible, it will give you...
12 Sep 2014 by Sergey Alexandrovich Kryukov
Please read Open CV documentation:http://docs.opencv.org/modules/core/doc/old_basic_structures.html[^],http://docs.opencv.org[^].The question is not very productive. It's pretty apparent that you are asking on the code which you did not write by yourself. Why trying to dig in it if you...
28 May 2015 by KarstenK
It is a linker problem, which means that the declared function isnt available for the linking stage. You must inlcude the implementatiion (file) of this function or add the lib to linked libraries. (Possible a namespace issue?)
3 Aug 2015 by Thomas Nielsen - getCore
An easy way would be to use one of the open source applications for that,this article describes nicely although you'll have to translate the 10 lines of code from vb.net :)Face Detection with 10 Lines of Code - VB.NET [^]
9 Sep 2015 by Suvabrata Roy
Hi,Problem 1 :I don't know how to load images from the foldersFolderBrowserDialog fbd = new FolderBrowserDialog(); DialogResult result = fbd.ShowDialog(); string[] files = { }; if (result == System.Windows.Forms.DialogResult.OK) ...
3 Feb 2016 by Rob Philpott
Looks fairly to the point to me. Traditionally, I would try to stay away from byte sized pointers and use something more native (32 or 64) bit and use bit manipulation, to minimize the memory accesses. That said, I don't think it makes much difference on modern day CPUs.Make sure you are...
17 May 2016 by Matt T Heffron
Yes there are SVM libraries.Bing search of "libsvm csharp" gives over 10,000 results (how many are useful?).There are SVM implementations for use in .NET applications.I suspect there are examples on using them.If you really want to learn about Machine Learning and Classification...
25 Sep 2019 by Afzaal Ahmad Zeeshan
A simple answer would be, list the shapes with their area, and then sort them in descending order based on their area, finally get the top 5. Also, like Bill had mentioned in the comment, you can ignore the Dictionary, and use SortedDictionary[^]. That will sort the data automatically for you...
29 Nov 2019 by phil.o
You could try framenumber.ToString("0000") Custom numeric format strings[^]
15 Jun 2022 by Chris Maunder
If you need to have a pure Python solution then the easiest way would be to clone the YOLOv5 repo and find a custom model that contains detection for cucumber seeds. Here's a walkthrough of YOLO and custom models[^]. As to a custom model of...
11 Sep 2013 by Bassam Abdul-Baki
Try this:string fileName = "test.png";RenderTargetBitmap target = new RenderTargetBitmap(800, 600, 96, 96, PixelFormats.Default);target.Render(this.MyGrid);BitmapEncoder encoder = new PngBitmapEncoder();encoder.Frames.Add(BitmapFrame.Create(target));// Save image to...
17 Jan 2011 by Andrew Brock
There are a vast number of image processing libraries that are free and a lot of them are open source.My top 2 would be:CxImage[^] - Very comprehensiveGDI+[^] - pretty easy to use, well documented and heaps of samplesAs for the timing, that is simple. You just need to use a timing...
23 Jan 2011 by Manfred Rudolf Bihy
Look here for some pseudo code: Vector Quantization LBG Pseudo Code[^].Good luck!
4 Mar 2011 by Noel3090
Hey friends please help me in coding median filter to remove noise from the fingerprint image using pointers. I have done this much...byte* imgPtr = (byte*)(void*)(data.Scan0); byte* src = (byte*)(void*)(data.Scan0); int sOffset = stride - 9; ...
14 Mar 2011 by Manfred Rudolf Bihy
Please have a look at this excellent article. Taking it as a given that your method objstud.viewtudentphoto(String txtImg) does indeed do what you expect of it please take a look at this article on CP: C# Image to Byte Array and Byte Array to Image Converter Class[^].Hope this helps...
1 May 2011 by #realJSOP
You can create an image, and then simply write text onto it. I wrote an article that demonstrates how to write text onto a bitmap. You may be able to adjust the code for your purposes.Render Text On A Bitmap (and other stuff)[^]
1 May 2011 by Sergey Alexandrovich Kryukov
Without extra library?! Well, AForce.NET is using .NET only, so, here is the plan:Try to solve the problem all by yourself;When you get enough experience and still face problems, build AForge.NET library and try to understand how it works; may be it will help you;Go back to item 1;...
5 May 2011 by Sergey Alexandrovich Kryukov
Peter is absolutely right.In addition to what he says, I can tell what is the only acceptable solution. I'm telling this like a user. The user should be advised to scan a document independently and post a bitmap file (PNG, JPG) on the Web form. If the user has a scanner, she or he is...
11 May 2011 by Olivier Levrey
BobJanova is right.GetPixel and SetPixel call LockBits and UnlockBits internally. This is why these functions are so slow and shouldn't be used for image processing.Follow this link to learn how to use LockBits and access internal...
1 Jun 2011 by OriginalGriff
Google for "C# ASPX Slideshow" - you will find so many examples...
3 Jul 2011 by Christian Graus
Photoshop will do it, simply by tiling your image and keeping either a smaller version, or a larger version of just the bit you can see, in memory.
20 Jul 2011 by ankur.mu
I want to convert 32 bpp bitmap into 8 bpp.If anyone knows how to do it, plz help.Thanks in Advance.
21 Jul 2011 by ankur.mu
I want to compress an uncompressed avi file into MS-CRAM (Microsoft Video 1). If anyone knows how to do it please help me with the code.Thanks!
21 Jul 2011 by Suresh Suthar
Hi AnkurI think this will help you out.I have used this in one of my project and its very impressive...A Simple C# Wrapper for the AviFile Library[^]
23 Jul 2011 by Sergey Alexandrovich Kryukov
The closest thing I could find for you is this: the program you can use is ImageJ by National Institutes of Health (http://en.wikipedia.org/wiki/National_Institutes_of_Health[^]), see http://en.wikipedia.org/wiki/ImageJ[^], http://rsb.info.nih.gov/ij/[^].You might need the plugin for this...
23 Jul 2011 by YvesDaoust
You will find an applet there: http://bigwww.epfl.ch/demo/jwatershed/index.html[^]Unfortunately, it only displays sizes up to 256 x 256.Two caveats:- the standard watershed transform is only defined for grayscale images, no color ones.- you can be surprised by the results,...
26 Jul 2011 by Richard MacCutchan
You can start here[^] for MPEG, and a similar search for WMV should get you the relevant details.
18 Aug 2011 by TheyCallMeMrJames
You'll want to cast the image to a Bitmap and then save the file out - there's a Save() method for you on the object.Bob Powell[^] has a ton of info on image manipulation that you will find very helpful. A simple scan of his work will find you several ways to do this.Cheers.
18 Aug 2011 by Andrew Rissing
It depends on what exactly you're trying to do. You can try placing the images over each other and adjusting the opacity of the top image to show the image below (this would be similar to applying a watermark).
3 Oct 2011 by Sergey Alexandrovich Kryukov
You did not provide any information on platform, language and imaging library you want to use, but embossing can be achieved with a simple convolution kernel, see, for example...
3 Oct 2011 by Espen Harlinn
Here is another article on the subject by Christian Graus[^]:Image Processing for Dummies with C# and GDI+ Part 2 - Convolution Filters[^]This is one of several articles by the author on image processing.Best regardsEspen Harlinn
6 Oct 2011 by wizardzz
How approximate must it be? Instead of counting each head, just determine the area filled (the actual dimensions) and then calculate the density of heads of a sample area. This could be more accurate for pictures that are not bird's eye view and go out to the horizon. It could also count...
21 Oct 2011 by N_tro_P
Yes it is possible.I assume by subtraction you are wanting to have the area of which is more 0ed be the stictched area.You will need some thresholding and such, but it is really not that complicated. If performance matters though, you may want to consider a few things such as processing...
31 Oct 2011 by OriginalGriff
That's a little obvious, isn't it? Or am I missing something?Load each frame into an Image (use the Image.FromFile[^] method), then handle the Paint event of a panel or form, and use the Graphics.DrawImage[^] method (with the supplied Graphics object) to paint each image on the screen in...
7 Nov 2011 by Mehdi Gholam
IrfanView is a client side application not a server side ASP.net component.
20 Nov 2011 by Mehdi Gholam
Use this : http://www.libtiff.org/libtiff.html[^]
18 Dec 2011 by Mehdi Gholam
When the patents expired in 2004 you are free to use the LZW compression scheme on it's own or in the GIF format, without licensing payments.
25 Jan 2012 by Tarakeshwar Reddy
It is your project and you would have to do it. If time is not enough, go to your prof and ask an extension of time. If you do not know the technology, I would suggest taking something simpler which you understand and implement. Taking a complex project will not help you get good grades. A...
1 Feb 2012 by Rajesh Anuhya
Here is the another best example linkhttp://www.c-sharpcorner.com/uploadfile/yougerthen/integrate-image-scanning-within-a-C-Sharp-application-part-vi/[^]Thanks--RA
13 Feb 2012 by Christian Graus
If you don't know anything about the problem space, why are you writing code to deal with it ? I assume this means there's an end user who is interested in using this code, you should approach them for the sort of images they want you to deal with.
23 Feb 2012 by enhzflep
I'd be amazed if it handled captcha detection, however for the remaining tasks - I'd be inclined to look into OpenCV (Open[source] Computer Vision)
23 Feb 2012 by jk chan
Hi shankha2010If you want to learn image processing/computer vision, i suggest you to read some basic books on digital image processing & numerical methods. for example Digital Image Processing by Rafael C is a good start. But it will take time to learn things also to implement it in C or...
26 Feb 2012 by BupeChombaDerrick
Trying checking out this articlehttp://www.eecs.umich.edu/~silvio/teaching/EECS598/papers/leibe-dynamic3dscene-cvpr07.pdf[^]But be specific, what you are trying to do is not even a well understood problem, so you must do most of the research yourself.
11 Apr 2012 by El_Codero
Hi,in this CP Article the transformation of RGBA values is well described, it should be clear how to write it in C (for CUDA), but it's not a weekend project.You can also P/Invoke CUDA functions to use in .NET.ColorMatrix Basics - Simple Image Color Adjustment[^]With Best Regards
23 May 2012 by Prosan
you can save image in database of sql as Varbinary(Max) datatype and saving image in database. First save image at particular path than readallbyte from this image and save these byte in your database table as describe in this code:-using System.IO;using System.Data.Common;using...
15 Jun 2012 by Farhan Ghumra
A DXF Reader Solution and a Simple DXF Viewer[^]CadLib 4.0 DWG DXF .NET Library [^]