鼠标移动获取视类图像灰度
来源:互联网 发布:手机摄像头破解软件 编辑:程序博客网 时间:2024/06/08 02:13
void CPvcamView::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
CStatusBar *pStatusBar = (CStatusBar *)AfxGetMainWnd()
->GetDescendantWindow(AFX_IDW_STATUS_BAR);
CString str1;
CString str2;
// 计算图像的绝对坐标
CPoint pt = point;
int scroll_x = GetScrollPos(SB_HORZ); // 滚动条已滚过的长度
int scroll_y = GetScrollPos(SB_VERT);
pt.x += scroll_x+1; // 因为图像坐标从0开始,所以最后结果要加1
pt.y += scroll_y+1;
// 读取当前点的颜色
COLORREF color = GetDC()->GetPixel(point); // COLORREF中颜色的排列顺序是BGR
str1.Format( " 坐标: x=%d y=%d ",pt.x,pt.y );
str2.Format( " 灰度值: %d ",GetRValue(color) );
pStatusBar->SetPaneInfo(1,NULL,NULL,130);
pStatusBar->SetPaneText(1,str1);
pStatusBar->SetPaneInfo(2,NULL,NULL,100);
pStatusBar->SetPaneText(2,str2);
CScrollView::OnMouseMove(nFlags, point);
CScrollView::OnMouseMove(nFlags, point);
}
- 鼠标移动获取视类图像灰度
- UIImage获取灰度图像
- 利用opencv,在图像中获取鼠标按下时坐标和灰度值
- opencv获取灰度图像直方图
- 获取鼠标移动位置
- 两种获取灰度图像的方法
- VS实现获取图像灰度共生矩阵
- C++获取鼠标坐标并移动鼠标
- js获取鼠标移动位置
- JavaScript鼠标移动获取坐标
- Opencv--鼠标获取图像坐标
- 灰度 灰度图像
- 灰度 灰度图像
- 灰度以及灰度图像
- 灰度与灰度图像
- 灰度 灰度图像
- 灰度与灰度图像
- 灰度图像
- 主流网站开发语言 ASP ASP.NET JSP PHP CGI
- matlab的simulink中出现警告VariableStepDiscrete' instead of solver 'ode45'
- VC多文档程序结构
- sina weibo:微博分享接口,自定义分享按钮样式
- 在MFC中怎样将窗口最小化到托盘?
- 鼠标移动获取视类图像灰度
- DrawDib函数组的使用
- 保存YUV和保存bmp文件
- 得到HBITMAP句柄保存位图
- MSSQLSERVER的经典面试题
- 多媒体定时器timeSetEvent
- UniCode 下 CString 转 char* 的方法
- UNICODE下创建多层目录
- 删除某个文件夹下所有文件以及文件夹