TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amol p
NA
1
0
I WANT TO DRAW A CIRCLE ON A IMAGE
Jun 16 2009 12:20 AM
SIR,
i am doing a application for immage processing where i am comparing 2 immages,,and i want to higlight the pixcles where the diffrence occours with a red colored circle..i am able to compare the images but not able to higlight it with the circle..i want the pixel which is diffrent to ve 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();
}
Reply
Answers (
0
)
Can I serialize an object right into an ADO.net row
Nodes.Tag..