更新 'Home'
29
Home.md
Normal file
29
Home.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
1、需求分析
|
||||||
|
|
||||||
|
FSA2 采集数据时,显示当前云量,以便用户判断当前野外光照条件是否适合采集数据;
|
||||||
|
2、功能概述
|
||||||
|
|
||||||
|
通过rgb图像进行云点识别 + 云量计算 + 输出云分布二值图;
|
||||||
|
3、api说明
|
||||||
|
|
||||||
|
Cloudage(int radius);//构造函数传入云量计算的有效半径
|
||||||
|
void setRadius(int radius);//此函数可以修改云量计算的有效半径
|
||||||
|
|
||||||
|
QImage readImage(QString imagePath);//此函数可以从磁盘读入图片
|
||||||
|
QImage createGrayscaleImage(int width, int height);////此函数根据参数创建一个灰度图像
|
||||||
|
|
||||||
|
void getPosOfCenterpixel(int width, int height, int &widthCenter, int &heightCenter);//计算图片的中心点
|
||||||
|
bool isValidPos(int x1, int y1, int x2, int y2);//判断像元点(x,y)是否在有效半径内
|
||||||
|
|
||||||
|
float getcloudage1(QImage image, bool saveBinaryImg = false);//通过算法1进行云量计算
|
||||||
|
float getcloudage2(QImage image, bool saveBinaryImg = false);//通过算法2进行云量计算
|
||||||
|
4、使用举例
|
||||||
|
|
||||||
|
QString imgPath = "D:\\PycharmProjects\\cloudage\\photo\\photo12.jpg";
|
||||||
|
|
||||||
|
Cloudage* tmp = new Cloudage(443);
|
||||||
|
QImage img = tmp->readImage(imgPath);
|
||||||
|
|
||||||
|
float cloud1 = tmp->getcloudage1(img);
|
||||||
|
float cloud2 = tmp->getcloudage2(img);
|
||||||
|
5、输出结果:
|
Reference in New Issue
Block a user