{
cp.Entries[i] = Color.FromArgb(i, i, i);
}
houghImage.Palette = cp;
Rectangle rectHough = new Rectangle(0, 0, 180, 180);
System.Drawing.Imaging.BitmapData houghData = houghImage.LockBits(rectHough,
System.Drawing.Imaging.ImageLockMode.ReadWrite, houghImage.PixelFormat);
IntPtr ptr = houghData.Scan0;
int bytes = 180 * 180;
byte[] grayHough = new byte[bytes];
for (int i = 0; i < 180; i++)
{
for (int j = 0; j < 180; j++)
{
grayHough[i * 180 + j] = Convert.ToByte(houghMap[i, j] * 255 /
maxHough);
}
}
System.Runtime.InteropServices.Marshal.Copy(grayHough, 0, ptr, bytes);
houghImage.UnlockBits(houghData);
Graphics g = e.Graphics;
g.DrawImage(houghImage, 40, 20, 180, 180);
g.FillRectangle(Brushes.Black, 250, 20, 180, 180);
double thresholding = maxHough * 0.6;
double k, b;
int x1, x2, y1, y2;
for (int i = 0; i < 180; i++)
{
for (int j = 0; j < 180; j++)
{
if (houghMap[i, j] > thresholding)
{
if (i == 90)
{
g.DrawLine(Pens.White, 250, 200, 250, 20);
- 上一篇:ASP.net+sqlserver在线考试管理系统设计与实现
- 下一篇:Linux服务器数据安全方案的设计与实现
-
-
-
-
-
-
-
杂拟谷盗体内共生菌沃尔...
中考体育项目与体育教学合理结合的研究
十二层带中心支撑钢结构...
河岸冲刷和泥沙淤积的监测国内外研究现状
电站锅炉暖风器设计任务书
大众媒体对公共政策制定的影响
乳业同业并购式全产业链...
当代大学生慈善意识研究+文献综述
java+mysql车辆管理系统的设计+源代码
酸性水汽提装置总汽提塔设计+CAD图纸