From 3442a14224d8a41122d12d7c612f33bafb98e34d Mon Sep 17 00:00:00 2001 From: tangchao0503 Date: Mon, 23 May 2022 16:27:09 +0800 Subject: [PATCH] =?UTF-8?q?cloudage=E5=8A=A8=E6=80=81=E5=BA=93=E6=89=8B?= =?UTF-8?q?=E5=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...%A8%E6%80%81%E5%BA%93%E6%89%8B%E5%86%8C.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 cloudage-%E5%8A%A8%E6%80%81%E5%BA%93%E6%89%8B%E5%86%8C.md diff --git a/cloudage-%E5%8A%A8%E6%80%81%E5%BA%93%E6%89%8B%E5%86%8C.md b/cloudage-%E5%8A%A8%E6%80%81%E5%BA%93%E6%89%8B%E5%86%8C.md new file mode 100644 index 0000000..ac96352 --- /dev/null +++ b/cloudage-%E5%8A%A8%E6%80%81%E5%BA%93%E6%89%8B%E5%86%8C.md @@ -0,0 +1,28 @@ +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, true); + float cloud2 = tmp->getcloudage2(img, true); + +5、输出结果: + \ No newline at end of file