Total members 9952 | Gratitudes |It is currently Sat Feb 11, 2012 3:01 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: i want to draw a circle on a image(any format bmp,jpeg etc.)
PostPosted: Wed Jun 17, 2009 5:32 am 
Offline
Newbie
User avatar

Joined: Wed Jun 17, 2009 5:25 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time

SIR,
i am doing a application for image processing where i am comparing 2 immages,,and i want to highlight the pixcles where the diffrence occours with a red colored circle..i am able to compare the images but not able to highlight it with the circle..i want the pixel which is diffrent to be the center of the circle..

if (img1.Width == img2.Width && img1.Height == img2.Height)
{
//drawing
g = pictureBox1.CreateGraphics();
//////g = Graphics.FromImage(pictureBox1.Image);


for (int i = 0; i < img1.Width; i++)
{
for (int j = 0; j < img1.Height; j++)
{
img1_ref = img1.GetPixel(i, j).ToString();
img2_ref = img2.GetPixel(i, j).ToString();
if (img1_ref != img2_ref)
{
count2++;
flag = false;

//drawing

x = i;
y = j;
pen = new Pen(Color.Red);
g.DrawEllipse(pen, x, y,100,100);


//drawing
MessageBox.Show("error");

break;
}
count1++;
}
progressBar1.Value++;
}

if (flag == false)
MessageBox.Show("Sorry, Images are not same , " + count2 + " wrong pixels found");
else
MessageBox.Show(" Images are same , " + count1 + " same pixels found and " + count2 + " wrong pixels found");
}
else
MessageBox.Show("can not compare this images");
this.Dispose();
}


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 put image on button in C#  Csharp examples  msi_333  2
 database contents display in table format in swing  GUI  subho07  4
 Hide the background image by one click  HTML examples  msi_333  0
 background-image Anchor in header links  HTML examples  msi_333  0
 crop image in java  Java examples  msi_333  2

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team