opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼

opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼

ID:18063597

大小:18.92 KB

頁(yè)數(shù):5頁(yè)

時(shí)間:2018-09-13

opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼_第1頁(yè)
opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼_第2頁(yè)
opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼_第3頁(yè)
opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼_第4頁(yè)
opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼_第5頁(yè)
資源描述:

《opencv 實(shí)現(xiàn)的橢圓檢測(cè)的源代碼》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫(kù)。

1、1.//?readbmp.cpp?:?Defines?the?entry?point?for?the?console?application.???2.//???3.???4.#include?"stdafx.h"???5.#include????6.???7.#include?"ipl.h"???8.#include?"cv.h"???9.//#include?"_cv.h"???10.//#include?"vlgrfmts.h"???11.???12.//------------------------

2、-----???13.////////UTILITY?FUNCTIONS???14.//???15.//?Read?in?a?BMP?and?convert?it?into?an?IPL???16.//?fin?The?file?name?of?the?BMP?with?path???17.//?plannar?If?set,?convert?the?image?to?plannar???18.//?flip?If?set,?mirror?the?image?around?the?horizontal?axis,?set???19.

3、//?IPL_ORIGIN_BL)???20.IplImage?*?readBMP2IPL(char?*fin,?int?plannar?=?0,?int?flip?=?0)???21.{???22.????int?filter;???23.????int?width=0,height=0,color=55,hdr_ret=0,close_ret?=?0,rd_ret?=?0;???24.????IplImage?*I;???25.????filter?=?gr_fmt_find_filter(fin?);?//Get?file?t

4、ype???26.????hdr_ret?=?gr_fmt_read_header(?filter,?&width,?&height,?&color?);//image?params???27.????I?=?cvCreateImageHeader(?cvSize(width,?height),?IPL_DEPTH_8U,?3);?//create?image?header???28.????I->align?=?IPL_ALIGN_QWORD;?//fix?the?problem?that?cvCreateImage?uses?a

5、lign?4???29.????I->depth?!=?IPL_DEPTH_32F???iplAllocateImage(?I,?0,?0?)?:iplAllocateImageFP(?I,?0,?0?);???30.????rd_ret?=?gr_fmt_read_data(filter,?I->imageData,?I->widthStep,?color);?//read?in?the?data,?origin?TL???31.????close_ret?=?gr_fmt_close_filter(?filter?);???32

6、.????if(plannar)?//If?plannar?order?desired,?turn?it?into?plannar?order???33.????{???34.????????IplImage?*Ip?=?iplCreateImageHeader(3,?0,?IPL_DEPTH_8U,?"RGB","BGR",?IPL_DATA_ORDER_PLANE,?I->origin,?IPL_ALIGN_QWORD,?width,?height,?NULL,NULL,NULL,NULL);???35.????????iplA

7、llocateImage(Ip,?0,0);???36.????????iplConvert(I,Ip);???37.????????cvReleaseImage(?&I?);???otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWestNorthOrga

8、nization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStat

當(dāng)前文檔最多預(yù)覽五頁(yè),下載文檔查看全文

此文檔下載收益歸作者所有

當(dāng)前文檔最多預(yù)覽五頁(yè),下載文檔查看全文
溫馨提示:
1. 部分包含數(shù)學(xué)公式或PPT動(dòng)畫(huà)的文件,查看預(yù)覽時(shí)可能會(huì)顯示錯(cuò)亂或異常,文件下載后無(wú)此問(wèn)題,請(qǐng)放心下載。
2. 本文檔由用戶(hù)上傳,版權(quán)歸屬用戶(hù),天天文庫(kù)負(fù)責(zé)整理代發(fā)布。如果您對(duì)本文檔版權(quán)有爭(zhēng)議請(qǐng)及時(shí)聯(lián)系客服。
3. 下載前請(qǐng)仔細(xì)閱讀文檔內(nèi)容,確認(rèn)文檔內(nèi)容符合您的需求后進(jìn)行下載,若出現(xiàn)內(nèi)容與標(biāo)題不符可向本站投訴處理。
4. 下載文檔時(shí)可能由于網(wǎng)絡(luò)波動(dòng)等原因無(wú)法下載或下載錯(cuò)誤,付費(fèi)完成后未能成功下載的用戶(hù)請(qǐng)聯(lián)系客服處理。