中文亚洲精品无码_熟女乱子伦免费_人人超碰人人爱国产_亚洲熟妇女综合网

當前位置: 首頁 > news >正文

網(wǎng)站建設(shè)合同印花稅稅目外鏈收錄網(wǎng)站

網(wǎng)站建設(shè)合同印花稅稅目,外鏈收錄網(wǎng)站,建設(shè)裝修公司網(wǎng)站,重慶網(wǎng)站制作1000圖像的縮放 resize(image, image, Size(round(image.cols * 0.5), round(image.rows * 0.5))); 輸入圖像 輸出圖像 大小變換 canny邊緣算子的使用 cvtColor(image, gray, COLOR_BGR2GRAY);Canny(gray, canny_mat, 40, 100); 必須先轉(zhuǎn)化為灰度圖,作為輸入 超過100是真…

圖像的縮放

	resize(image, image, Size(round(image.cols * 0.5), round(image.rows * 0.5)));

?輸入圖像 輸出圖像 大小變換

canny邊緣算子的使用

	cvtColor(image, gray, COLOR_BGR2GRAY);Canny(gray, canny_mat, 40, 100);

?必須先轉(zhuǎn)化為灰度圖,作為輸入 超過100是真的邊緣 低于40是確定不是邊緣 在中間若連接邊緣 則為邊緣?

普通旋轉(zhuǎn)縮放變換(仿射變換)

?獲取仿射變換矩陣

	float angel = -10.0, scale = 1;Mat dstmat;Point2f center(image.cols * 0.5, image.rows * 0.5);Mat affine_matrix = getRotationMatrix2D(center, angel, scale);

獲取仿射變換的矩陣 中心點 旋轉(zhuǎn)角度 大小是否變換

-10是順時針轉(zhuǎn)

仿射變換函數(shù)

warpAffine(image, dstmat, affine_matrix,image.size());

輸入圖 輸出圖 仿射變換矩陣 畫布的大小?

這樣的仿射變換有旋轉(zhuǎn)的缺陷,因為大小和原圖一樣,但旋轉(zhuǎn)后,外接矩形肯定大于原圖,所以溢出的部分會看不到,后期會更新改進版

點到點的仿射變換(6變量?所以要3個點對3個點)

	Mat affine_Mat;const cv::Point2f src_pt[] = {cv::Point2f(100,100),cv::Point2f(20,30),cv::Point2f(70,90),};const cv::Point2f warp_pt[] = {cv::Point2f(50,100),cv::Point2f(50,20),cv::Point2f(70,96),};Mat affine_matrix2 = cv::getAffineTransform(src_pt, warp_pt);warpAffine(image, affine_Mat, affine_matrix2,image.size());

一個點對應(yīng)一個點?

計算機會幫我們求出仿射變換的矩陣

點到點的透射變換(8變量?所以要4個點對4個點)

	Mat perspective_Mat;cv::Point2f pts1[] = {cv::Point2f(150,150),cv::Point2f(150,300),cv::Point2f(350,300),cv::Point2f(350,150),};cv::Point2f pts2[] = {cv::Point2f(200,150),cv::Point2f(200,300),cv::Point2f(340,270),cv::Point2f(340,180),};Mat perspective_matrix = cv::getPerspectiveTransform(pts1, pts2);warpPerspective(image, perspective_Mat, perspective_matrix, image.size());

?總體代碼:

#include <opencv2/opencv.hpp>
#include<iostream>
using namespace std;
using namespace cv;int main() {Mat image = imread("lena.jpeg");imshow("lena", image);waitKey(0);cvDestroyAllWindows();resize(image, image, Size(round(image.cols * 0.5), round(image.rows * 0.5)));imshow("lena", image);waitKey(0);cvDestroyAllWindows();Mat gray;Mat canny_mat;cvtColor(image, gray, COLOR_BGR2GRAY);Canny(gray, canny_mat, 40, 100);imshow("canny_mat", canny_mat);waitKey(0);cvDestroyAllWindows();	float angel = -10.0, scale = 1;Mat dstmat;Point2f center(image.cols * 0.5, image.rows * 0.5);Mat affine_matrix = getRotationMatrix2D(center, angel, scale);warpAffine(image, dstmat, affine_matrix,image.size());imshow("dstmat", dstmat);waitKey(0);cvDestroyAllWindows();Mat affine_Mat;const cv::Point2f src_pt[] = {cv::Point2f(100,100),cv::Point2f(20,30),cv::Point2f(70,90),};const cv::Point2f warp_pt[] = {cv::Point2f(50,100),cv::Point2f(50,20),cv::Point2f(70,96),};Mat affine_matrix2 = cv::getAffineTransform(src_pt, warp_pt);warpAffine(image, affine_Mat, affine_matrix2,image.size());imshow("affine_Mat", affine_Mat);waitKey(0);cvDestroyAllWindows();Mat perspective_Mat;cv::Point2f pts1[] = {cv::Point2f(150,150),cv::Point2f(150,300),cv::Point2f(350,300),cv::Point2f(350,150),};cv::Point2f pts2[] = {cv::Point2f(200,150),cv::Point2f(200,300),cv::Point2f(340,270),cv::Point2f(340,180),};Mat perspective_matrix = cv::getPerspectiveTransform(pts1, pts2);warpPerspective(image, perspective_Mat, perspective_matrix, image.size());imshow("perspective_Mat", perspective_Mat);waitKey(0);cvDestroyAllWindows();//疑問 圖像的平移如何實現(xiàn)  image.size()是什么個東西 如何改變圖像大小?return 0;
}

http://www.risenshineclean.com/news/54796.html

相關(guān)文章:

  • vs2015網(wǎng)站開發(fā)教程seo搜索優(yōu)化待遇
  • 青島做網(wǎng)站的公司深圳市前十的互聯(lián)網(wǎng)推廣公司
  • asp網(wǎng)站后臺安全退出購物網(wǎng)站
  • 做網(wǎng)站哪家南京做網(wǎng)站網(wǎng)站關(guān)鍵詞挖掘
  • 網(wǎng)站建設(shè)市場前景體育新聞最新消息
  • 網(wǎng)站沒有被搜索引擎收錄東莞seo排名公司
  • 愛情動做網(wǎng)站推薦收錄批量查詢
  • 國內(nèi)做賭博網(wǎng)站代理怎么樣加快百度收錄的方法
  • 分布式移動網(wǎng)站開發(fā)技術(shù)一個品牌的策劃方案
  • 南昌哪里可以做電商網(wǎng)站seo收索引擎優(yōu)化
  • seo策略是什么青島seo推廣
  • 網(wǎng)站開發(fā)方向行業(yè)現(xiàn)狀青島網(wǎng)站建設(shè)制作公司
  • 建網(wǎng)站報價 優(yōu)幫云web免費網(wǎng)站
  • 常州做沙灘旗的公司網(wǎng)站做網(wǎng)絡(luò)優(yōu)化的公司排名
  • 安裝網(wǎng)站系統(tǒng)個人網(wǎng)絡(luò)銷售平臺
  • 建設(shè)獨立服務(wù)器網(wǎng)站成人技能培訓
  • 用discuz做的網(wǎng)站代哥seo
  • 中山市飲食網(wǎng)站建設(shè)網(wǎng)站性能優(yōu)化
  • 外貿(mào)行業(yè)建站廣告代運營公司
  • 網(wǎng)站做多久流量愛站網(wǎng) 關(guān)鍵詞挖掘
  • 諸城市做網(wǎng)站百度問答庫
  • 網(wǎng)站js下載網(wǎng)站搜索引擎優(yōu)化方法
  • 視頻解析網(wǎng)站建設(shè)中國人民銀行網(wǎng)站
  • 做網(wǎng)站空間500m多少錢推廣下載app賺錢
  • 網(wǎng)站開發(fā)報價明細營銷推廣的公司
  • 杭州十大室內(nèi)設(shè)計公司網(wǎng)站關(guān)鍵詞優(yōu)化方法
  • 公司網(wǎng)站怎么做站外鏈接濟南seo外包公司
  • 做網(wǎng)站推廣客服好做么百度地址
  • 去菲律賓做網(wǎng)站百度seo標題優(yōu)化軟件
  • 大連城建設(shè)計研究院網(wǎng)站南昌seo顧問