zoukankan
html css js c++ java
图像面积(像素的个数)
writen by wqj1212@yahoo.com.cn
void
Cbiaoji1::mianji(IplImage
*
src)
{
biaoji(src);
memset(fg,
0
,
255
);
y_sign
=
0
;
int
m_Area
=
0
;
for
(
int
i
=
1
;i
<=
x_sign;i
++
)
{
if
(flag[i]
!=
0
)
{
if
(fg[y_sign]
==
0
)
{
fg[y_sign]
=
flag[i];
++
y_sign;
}
}
m_Area
+=
flag[i];
}
cout
<<
"
目标:
"
<<
y_sign
<<
endl;
cout
<<
"
m_Area
"
<<
m_Area
<<
endl;
for
(i
=
0
;i
<
y_sign;i
++
)
{
cout
<<
"
连通区:
"
<<
i
+
1
<<
"
的面积:
"
<<
fg[i]
<<
endl;
}
cvReleaseImage(
&
temp);
}
查看全文
相关阅读:
firewall&iptables
Linux压缩&解压缩
Centos7.4 修改selinux错误导致服务器起不来
Anaconda 安装 pytorch报错解决方法
Java8 map value排序
SparkStreaming获取kafka数据的两种方式:Receiver与Direct
vim常用的骚操作
http server
转:WinInet, WinHttp, Winsock, ws2_32的区别和联系
windows xp 驱动开发(三)DDK与WDK WDM的区别
原文地址:https://www.cnblogs.com/wqj1212/p/1009663.html
最新文章
MBProgressHUD
IOS 第三方框架-MBProgressHUD
iOS技巧-UITabBar改变默认高度
iOS原生App与H5页面交互笔记
WebAPP与原生APP的交互设计区别
Interface builder was unable to determine the type of xxx.xib
ios 键盘弹出视图上移
爬虫库之BeautifulSoup学习(四)
爬虫库之BeautifulSoup学习(三)
爬虫库之BeautifulSoup学习(二)
热门文章
爬虫库之BeautifulSoup学习(一)
Android 常用adb shell 命令(转)
Monkey学习(转载)
系统管理常用Linux命令
QC使用常见问题
进程和线程关系与区别
Jmeter常见问题
CDH6.3.1安装hue 报错
Centos7.4 离线安装httpd(解决rpm依赖)
SecureCRT 多窗口 批量操作Linux
Copyright © 2011-2022 走看看