Click here to Skip to main content
15,914,500 members

Comments by elgammal (Top 8 by date)

elgammal 14-Mar-12 10:09am View    
Thank you
elgammal 13-Mar-12 11:13am View    
yes my question is how to design these pieces in c# form
elgammal 6-Feb-12 17:11pm View    
thanks for attention ,
but count and area already float variables!!!!!!!!
elgammal 10-Jan-12 9:44am View    
thank you for this help ,
i use this and it work properly
but it has small fault which is that ,Rotation cut the image corners

i firstly use this method for image rotation:

private Bitmap rotateImage(Bitmap b, float angle)
{
//create a new empty bitmap to hold rotated image
Bitmap returnBitmap = new Bitmap(b.Width, b.Height);
//make a graphics object from the empty bitmap
Graphics g = Graphics.FromImage(returnBitmap);
//move rotation point to center of image
g.TranslateTransform((float)b.Width/2, (float)b.Height / 2);
//rotate
g.RotateTransform(angle);
//move image back
g.TranslateTransform(-(float)b.Width/2,-(float)b.Height / 2);
//draw passed in image onto graphics object
g.DrawImage(b, new Point(0, 0));
return returnBitmap;
}

but it also cut image corners ,

i want some way not to cut image corners in EmguCV rotation ...
elgammal 9-Jan-12 16:37pm View    
Iam so sorry for this error ,
i don't how it is copied with this shape
this my actual code

private void button12_Click(object sender, EventArgs e)
{
Bitmap bm = new Bitmap(pictureBox1.Image);
Image<gray,byte> img = new Image<gray,byte>(bm);
double x = 20;
img.Rotate(x, new Gray(255));
pictureBox9.Image = img.ToBitmap();
}