Click here to Skip to main content
15,867,453 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 Title

Image Processing 

25 Oct 2015 by NekoNao
Cropping, Covnerting to Gray , Gray to Black and White seems to be working fine but I have problem with Morphology - it is from Aforge Library.'MAKE OPENING MORPHOLOGYDim x As Bitmap = PictureBox3.ImageDim filterOpening As New Opening()PictureBox4.Image =...
25 Oct 2015 by NekoNao
finally. Found the answer here.[^]Dim bmp32bpp As Bitmap = bmp8bppIndexed.Clone _ (New Rectangle(Point.Empty, bmp8bppIndexed.Size), _ Imaging.PixelFormat.Format32bppArgb)
31 Oct 2013 by Maximilien
Happy monday.I'm trying to use a GIF or a 8 bpp BMP image image as a source for an OpenGL texture.The code is working well for other types of image (24, 32bits image)I'm loading the file with CImage, but I'm having problems figuring the format and type parameters of the glTexImage2D...
15 Oct 2012 by Johannes Bildstein
Hi!I´m trying to edit 16 bit image data but I can´t access the full 16 bit of each pixel.The following code is working flawlessly with 8 bit images.private void ImageEditing(){ //opening a 8 bit per pixel jpg image Bitmap bmp = new Bitmap("Image.jpg"); int...
15 Oct 2012 by Sergey Alexandrovich Kryukov
The code is basically correct, but it cannot universally work, just because all your shifts will depends on pixel format, which you never use. You only transparently pass bmp.PixelFormat as a parameter to a new bitmap. The code cannot work correctly unless you analyze the value of...
15 Oct 2012 by Johannes Bildstein
I finally found the solution!Because I changed the row from byte to ushort the row has only half the length.so for a 16 bit image the code would look like this:private void ImageEditing(){ //opening a 16 bit per pixel tif image Bitmap bmp = new...
25 Dec 2013 by kodmail
I have 512*512 16 bit raw 'Lena' data I wanna show this data 24bit or 32bit depth colored image. I use C#.I show this data 16 bit gray scale;gray scale 16bit depth Lenabut I wanna show colored image as the given link colored Lena
7 Jun 2012 by chamara54
Is it's possible to get 2d-fft of image using aforge.net i want get numeric values form original image to distinct image from other imagenote :i doing seed identification project after capture seed image detect the seed shape andedge pattern(using some image processing function )after...
8 Jun 2012 by Sergey Alexandrovich Kryukov
Look more thoroughly at the AForge.NET documentation. It looks like the class ComplexImage supports 2D FFT:http://www.aforgenet.com/framework/docs/html/8ec218c8-628b-e6b9-c398-3d65f14280d5.htm[^].If I'm not much mistaken, this is not the only way to use 2D FFT.See also this CodeProject...
2 Sep 2021 by Member 15345349
I am running into an issue with simple image stitching. Using a pixel by pixel overlap stitch, I am able to produce a fairly accurate stitch however some of my sub-images have slight vertical deviation (and possible horizontal deviation). Are...
2 Sep 2021 by Peter_in_2780
Hugin Panorama is the bee's knees, and the price is right. Hugin - Panorama photo stitcher[^] You could spend a lifetime exploring the tools and features. Great for perspective correction on single images too. Take a photo of something framed...
8 Apr 2020 by Member 10107283
Hello,Where can I find a 3D image segmentation code using Otsu thresholding or using watershed transform. In any language but preferably in MATLAB language. kindly direct me to the right placeThank you very much,
24 Feb 2013 by louisejackie
01626 typedef struct _StructBufferStatus01627 {01629 long ImageBufferCount;01638 unsigned char **ImageBuffers;01644 int LastValidFrame;01647 long TotalFramesSavedToBuffer;01653 float ImageBufferSizeInMegabytes;01655 } StructBufferStatus;long ...
24 Feb 2013 by nv3
From what I see in the documentation, image buffers are filled in a round robin fashion. At the beginning (until the first wrap-around occurs) buffers 0 ... LastValidFrame should be valid. When ImageBufferCount frames have been filled, they start reusing the buffers, starting again with buffer...
13 Apr 2015 by OriginalGriff
We still do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may...
24 Oct 2011 by graduate student
hi alli have an image of the desktop,the image size is smaller than the desktop sizehow can i find a point on the desktop corresponding to the a point in the image
24 Oct 2011 by Sergey Alexandrovich Kryukov
Please see my comment to the question. In both cases, this is not a problem for gradate students. It means the solution of linear equations which is a work for middle school or early high school student (it depends on your school system, but it requires level well below the required entry level...
24 Oct 2011 by OriginalGriff
Assuming you have a point on the image relative to the top left hand corner of the image in terms of image coordinates, then it is a simple matter of scaling: Xdesktop = Ximage * (Widthdesktop / Widthimage)Ydesktop = Yimage * (Heightdesktop / Heightimage)Obviously, you won't...
24 Oct 2011 by Praveen Kullu
Let the coordinates of point on image be x,y. Then your corresponding point on desktop will be like this.new point = new point(x* Desktopwidth/imagewidth,y*Desktopheight/imageheight)This is in theory, but i hope you get my point. If you don't then reply.
25 Jun 2016 by Will J Miller
This article describes the implementation of a custom class called MMSCropImageView. The class gives the feature of drawing and moving a rectangle over an image to identify the crop region and return it in an UIImage. It explains the considerations and solutions for cropping a bitmap.
22 Mar 2019 by Apriorit Inc, Vadym Zhernovyi
Learn more about the challenges we faced with dataset preparation and network configuration, and how these problems can be solved.
18 Aug 2014 by pi19404
In this article we will look at Adaptive Skin Color Detection technique described in the paper "An Adaptive Real-time Skin Detector Based on Hue Thresholding"
16 Apr 2013 by prasad kolekar60
hi,i am trying to modify libtiff so as to support jpeg2000 encode/decode tiles in a tiff image anyone having pointers , solutions pls suggest
25 Mar 2013 by Mads1967
Hello!I have been trying to make a piece of code, that will allow me to adjust the contrast of an image.Earlier I found a fast and easy way using matrix to adjust brightness, and I really need a similar system for the contrast.What I have found until now is either working way too...
9 Oct 2011 by flaese
Hello, Im creating program for adjusting HSL to image with 3 sliders (hue saturation lightness) like photoshop, gimp etc and something going wrong. I have taken converting algorithm from wiki - http://ru.wikipedia.org/wiki/HSL(strange thing that in english and russian wiki algorithms are...
3 Dec 2016 by violence666
hello,I have 2 sets of image points (x,y) from 2 images (ImgX, ImgY)I would like to use these image points and find the affine transformation between the two images.The getAffineTransform() function of openCV gives me a matrix of individual image points rather than a final matrix...
3 Dec 2016 by Arthur V. Ratz
Here's how: http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/warp_affine/warp_affine.html
7 Apr 2015 by Member 11580516
I have a problem with counting small objects on the image. In example I used BlobCounter class (from AForge framework). But it doesnt recognize splitted objects. Here is the function outputhttp://s3.postimg.org/cwkexxucj/result.jpg[^]Here is the treshold that method...
7 Apr 2015 by Sergey Alexandrovich Kryukov
There is no such thing as "splitted" objects. From the blob recognition standpoint, they are just different objects (calculated correctly, for this matter). It's just your scenery is not well defined. You can play with contrast and other filters before applying blob recognition. Such...
27 Apr 2013 by Member 8973214
Hi FriendsI am working on a semester project that includes Aforge.net and C#.I want to track color, color extraction is working fine. but I have problem with background extraction. I have Background image, Foreground image and and want to get the result image. following is the work I have...
26 Apr 2013 by Sergey Alexandrovich Kryukov
Why not using either EuclideanColorFiltering (that was my first idea) or, say, YCbCrFiltering instead?Please...
10 May 2013 by erikdeboer
I created a filter just for that, use it if you like it.using AForge.Imaging;using AForge.Imaging.Filters;using System;using System.Collections.Generic;using System.Drawing;using System.Drawing.Imaging;namespace ISpyFilterTest.service.camera.filter { public class...
24 Sep 2015 by silvsten john
HiIn latest aforge.net versions(2.2.4,2.2.5 etc) the class filter gray to gray class is not availble..these class were available in older aforge versions (1.6.2)...in latest versions these class got modified..Anybody know what is the respective class in new version instead filter gray to...
24 May 2018 by Member 8973214
Hi Friendsclass VideoCaptureDevice, DesiredFrameSize property is not working for me, tell me where is mistake in (1)? same as (1) problem I also want to set custom DesiredFrameRate property. (1):videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice...
14 May 2013 by Sergey Alexandrovich Kryukov
I never tried AForge.NET DesiredFrameSize, but I don't think it can possibly set any size you may wish. The cameras usually have some set of predefined modes, and some modes have different frame size. If your requested size is supported by one of the available modes, it will work, if not — it...
17 May 2013 by Sergey Alexandrovich Kryukov
Member 8973214 wrote:Yeah, the following link shows how to create keyboard shortcut in windows to open an application [some irrelevant link, removed — SA], but I want to do this via C# code.Please see my last comment to Solution 1.You may want to do it in one of the two ways: 1) you can make...
24 May 2018 by Member 13785296
private void Form1_Load(object sender, EventArgs e) { videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); VideoCaptureDevice videoSource = newVideoCaptureDevice(videoDevices[0].MonikerString); videoSource.NewFrame += new NewFrameEventHandler(video_NewFrame); ...
30 Jun 2014 by Talon96
I have two images (of a few thousand), lets call them image A and image B. I know that they either go side by side, AB or BA, but how can I verify this using c# code?Some of the images, when put side by side, will match up. Lines will align, so will circles and everything else. Some will not...
30 Jun 2014 by CPallini
I would consider the right border of the left image and the left border of the right one (the width of the borders is up to you). for each pixel in each border you may test the neighbour pixels and establish some properties. i would expect such properties don't change abruptly passing from one...
2 Jul 2014 by Talon96
I started off by comparing the values of ARGB between the two sides, row by row. I found that there is not enough differences between the sides that match and the ones that don't.I am now considering taking the ABS values of the differences in Red, Green and Blue and see if that helps. Past...
4 Sep 2013 by Grasshopper.iics
You would never want to use another photo editor in your AIO again
2 Sep 2014 by pi19404
In this article, we will look at unistrore gesture recognition for Android devices
16 Apr 2015 by Mahmoud M El-Sayed
Hello everyone,I need to recognize images using Android Development and Sift Algorithms or another algorithm .I wanna make application that the user will detect photo with camera and this photo will match with the database and the result will show to him text or other media please i wanna help.
3 Feb 2013 by analogx
Hi,To start with I have a application whose resolution is hard coded to 1024*768,now i want to scale down this application resolution to 800*480 so as to execute it on low res device,so my question is how can i dynamically re-size the existing images so as to make it fit for 800*480 resolution...
3 Feb 2013 by Sergey Alexandrovich Kryukov
If you hard-coded your application to some screen size, through it out as soon as possible, at least its UI part, and never write things like that. Your application should behave nicely on different screen sizes, otherwise nobody needs it.Your question simply makes no sense.—SA
10 Mar 2013 by Mich_90
I build 3D image from two 2D images with help of EMGU wrapper.In reconstructed image I have some object andI have a dimensions in pixels(from two 2D images) of the object and focal length of the camera.I need to get the real size of the object.Any idea how to implement it?
25 Sep 2012 by Mich_90
In my project Im using EMGU librery.I need to determine the background color of the urban poster or broadsheet.As I see the background color of the poster or broadsheet is the predominant color.My question if Emgu has any function that returns(in certain existing models BGR,HSL...)...
25 Sep 2012 by Sergey Alexandrovich Kryukov
I have no idea what can you find in this library, but I can note that just the definition of "predominant color" will appear way more difficult than you probably think. Well, you can calculate the color histograms, find some modes (or not; http://en.wikipedia.org/wiki/Mode_%28statistics%29[^]);...
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; ...
4 Mar 2011 by sairam.bhat
Noise Reduction of an Image in C# using Median FiltersOne of the main issues when trying to do image processing is the simple fact that images usually contain some degree of noise. This noise can in turn cause issues. For instance if you're doing edge detection, a spot on the image may cause...
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
20 Jun 2011 by asma89
i want to apply undo and redo operations on button in a photo editing application in c# programming , so that when i click undo the action on image in pictureBox is retrieved.any one know how to apply that?
20 Jun 2011 by Abhinav S
This s[^] has an undo implementation. You could consider using the logic behind this.
20 Jun 2011 by Pete O'Hanlon
It really depends on how you've written your application. One way to do this is to apply a command pattern to the application where each action on your image is applied as a command. Undoing the operation would remove the last command, and redoing it would reapply the last command.If that...
20 Jun 2011 by BobJanova
There are two ways to do undo/redo. Both involve an undo stack.In the first, you simply put the state before the action on the stack. This is very easy, but can get memory intensive quickly, particularly for an image editor where the state is an image which can be megabytes in size.In...
20 Jun 2011 by Sergey Alexandrovich Kryukov
Yes. You need to program this feature from scratch. For example, store a circular ring of few past steps in editing in a queue of images. For example, if you use bitmap, use System.Collections.Generic.Queue. Each time you commit the change, push newly modified image and remove the oldest...
9 Dec 2013 by baliram bhande
import java.awt.image.BufferedImage;import javax.imageio.ImageIO;import javax.swing.JLabel;import javax.swing.ImageIcon;import java.awt.Color;import java.awt.Point;import java.io.File;import java.util.ArrayList;class getting_rightsidepixel { static ArrayList l2 = new...
10 Dec 2013 by TorstenH.
I would start searching here:getting_lastpixel.java - Line 49You can switch on line numbers in eclipse by searching them in the preferences and marking that function. http://www.mkyong.com/eclipse/how-to-display-line-numbers-in-eclipse/[^]That helps in debugging.
10 Dec 2013 by CPallini
What about a tutorial on debugging Java code? Google[^] is your friend.
16 Dec 2013 by baliram bhande
import java.awt.image.BufferedImage;import javax.imageio.ImageIO;import javax.swing.JLabel;import javax.swing.ImageIcon;import java.awt.Color;import java.awt.Point;import java.io.File;import java.util.ArrayList;class getting_leftsidepixel1 { static int...
13 Aug 2021 by payam mohammadi
hi guys i wrote this code in c# (winform) . my app use from Emgu-cv library for image processing in c# you can see codes of main file (lineutil.cs) as below with this code app can draw lines with (Houghline) and app can find intersection points...
15 Nov 2011 by Robert Kirchhof
Very simple program. Basically saves and image to disk and displays it on the web page. Here's the code.
15 Nov 2011 by mhamad zarif
try this :Image1.ImageUrl = (Server.MapPath("~/Images/TempImg.jpg")
16 Nov 2011 by Robert Kirchhof
Apparently I needed the Server.MapPath only for the write operation. The code below works! My thanks to Mhamad for putting me on the right track.TempImg = System.Drawing.Image.FromStream(stmBLOBData) 'Load image from streamTempImg.Save(Server.MapPath("~/Images") + "\TempImg.jpg") 'save...
16 Nov 2011 by Robert Kirchhof
I spoke too soon. Now it works great in the IDE (Visual Studio 2010) but when I publish it to my local webserver and browse to it it crashes with the following error.Server Error in '/WebSite' Application.--------------------------------------------------------------------------------A...
31 Oct 2017 by Ralf Meier
The Search-Function from the CP-Forum brings this results : Search[^]
13 Feb 2014 by Anand Gunasekaran
Scanner automatically scans multiple pages using BackgroundWorker Thread
4 Jan 2022 by Member 14047666
We are performing Auto Crop operations using OpenCV library in C# project, For few sample automatically cropping the image but for other samples images are not cropped. Let us know anything is missing in source code. Please find the below piece...
4 Jan 2022 by KarstenK
A clear case for the debugger, because it is some special situation. So use the tool with some test data. I think your fix coordinates in the code can be a problem when using different image sizes. Also read the OpenCV documentation for...
7 Nov 2013 by Abe-r
How can I make the background of an image black and all the objects present are white? I have tried the AbsDif and thressholding its result but it considers the lighting very much.Here is the sample image :...
14 Nov 2016 by Member 12517620
Try Canny filtering first to detect edges Dim img As New Image(Of Bgr, Byte)("img.jpg")Dim imgCANNY As Image(Of Gray, Byte) = img.Canny(90, 70)Then make Binarization Dim img_BINARY As Image(Of Bgr, Byte) = img.ThresholdBinary(New Bgr(100, 100, 0), New Bgr(0, 100, 100))...
21 Oct 2014 by Joel Palmer
I need to read 1D and 2D barcodes from pictures taken by a camera on a Windows 8.1 device into a .NET application. There are big vendor names out there like rasteredge and aspose that have SDKs but they are expensive. There are also some libraries that are free on sourceforge.Does...
21 Oct 2014 by Sergey Alexandrovich Kryukov
Please see: http://bit.ly/1CRPvzh[^].Some solutions will be proprietary but some are freeware (not so sure about open source; you can try to find it out yourself).As bar code recognition is relatively simple, compared to most other recognition problems, it's not overly difficult to develop...
23 Oct 2014 by Xiao Ling
Before making your decision, I suggest you should evaluate both paid (usually 30-day free trial) and free products to see whether they can satisfy your requirement, which is the key point that you should care about. Here you can find some barcode demos in .Net...
2 Jan 2013 by VforVIMAL
Tell me any Algorithm can be used for Hand Gesture Recognition which yields more accurate result.....
3 Jan 2013 by Sergey Alexandrovich Kryukov
Please see this CodeProject article: Hands Gesture Recognition[^].By the way, for your information, CodeProject member Andrew Kirillov is the author of famous computer vision and artificial intelligence library AForge.NET (http://en.wikipedia.org/wiki/AForge.net[^],...
29 Dec 2012 by VforVIMAL
Which is the best language for doing Gesture recognition (i.e) Hand detection. By which can get more accurate result and more instantly....
29 Dec 2012 by A-s-h-l-e-y
Microsoft offer the Kinect Labs SDK for windows. It works in visual studio so c# or ++. Im assuming this is what you mean.
29 Dec 2012 by Jibesh
There are good open source libraries for image processing, some of them are listed belowOpenCV A C++ Image Process Lib[^]emgu .Net Wrapper for OpenCV[^]they have varieties image processing algorithms you may take a look at them to match your need.
18 Feb 2019 by Member 14154870
Need your help. Ok guys, let me explain. For example i hv game. It is 500x500 pixels. shows random pictures. When there is a exact image of smiling dog, you need to press space in 1 second. So basicly i need a fastest, most reliable, most efficient (in terms of performance) way to: Scan this...
18 Feb 2019 by RickZeeland
Maybe you can use this Python project which works on Windows, Linux and Mac: GitHub - ageitgey/face_recognition: The world's simplest facial recognition api for Python and the command line[^]
21 May 2011 by JohnExalt
The article demonstrates how to calculate various points in a Bezier curve and determine the angle at any point.
3 Apr 2019 by Mahsa Hassankashi
6 Jul 2013 by hirosht
Step by step method of thresholding a image using the EmguCV API in C#
5 Aug 2016 by User 6976447
I am using a custom class to write an image onto another image of bigger size.I am using a custom class to write an image onto another image of bigger size.doc - Google Drive[^]public class BitmapLockerTest{ private static string path = @"locker.png"; public static void...
6 Feb 2020 by Member 14589606
I try to run the code, it doesnt tell the format but closes immediately, any ideas? The path is correct as it some times flashes the format and then closes using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using...
6 Feb 2020 by phil.o
If you do not want it to close automatically, you can addConsole.WriteLine("Press a key..."); Console.ReadKey(); at the end of the Main method.
11 Oct 2015 by DANIEL_PD
Hello Community,I am encountering a problem while doing some calculation with a bitmap. I want to get the summed up brightness of a bitmap (659 x 494) and a matrix with the brightness values. To do that I combined some helpful articles from here.Here is the code:public static double...
11 Oct 2015 by George Jonsson
Start to put a try catch around your code and show any error in a MessageBox.public static double CALC_BRIGHTNESS(Bitmap bm){ Bitmap tmpBmp = null; // Declare this variable outside the try-catch block // and call dispose in finally try { ...
10 Apr 2012 by akul123
To change brightness of an image in c#.net 4 i have used the following method. public void SetBrightness(int brightness) { imageHandler.RestorePrevious(); if (brightness 255) brightness...
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...
22 Feb 2015 by NaMaCk
Using Directx.Capture; to Capture a picture from a Webcam (Capture the Frame from the Preview PictureBox). Displaying Length of that Frame is sometimes (rare) ok : around 25000 Most of the time is more than 10x larger, around 320000! Why is that? width and height always the same in both cases...
25 Aug 2015 by Member 11695570
Hi can you please explain me how can i send an image to a windows runnig virtual machin in a cloud make some changes on it(write some code in cloud for image proccesing) and downlod the changednimage thank you
19 Feb 2013 by alexandrosok
i wrote that code to calculate the distance between two point any one can gime a tip how to get the minimun distance between these point -not the max - ^^thanks a lotint distanceX; int distanceY; int index = 0; int max_index =...
19 Feb 2013 by Sergey Alexandrovich Kryukov
Use the following feature: double.PositiveInfinity as a starting value, if you want to find minimum, and double.NegativeInfinity, if you want to find...
18 Jun 2015 by abdulsafran
Dear Experts, below is my code. I'm saving an image with add some contents to the image from DrawString. My problem is, once I saved the image, CMYK become RGB, image size is different, image dpi is different. Like that several input image configurations were changed.I just want to keep the...
18 Jun 2015 by Sergey Alexandrovich Kryukov
This is weird, but, first of all, eliminate new Bitmap(Image). Use Bitmap bmp = new Bitmap(fileName);And if you really wanted to initialize a bitmap from some abstract Image instance when a file is not accessible, and if you also wanted to change the size and PixelFormat, you would need to...
26 Mar 2015 by Member 11380736
c#I would like to be able to save images in different formats, but I'm not able to do it.This doesn't work:public void CutFromScreen(string cut_from, int x, int y, int w, int h, string save_to) {string test = "Png"; //Skær ud efter mus ...