标准梯度—lhMorpGradient
生活随笔
收集整理的這篇文章主要介紹了
标准梯度—lhMorpGradient
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
標準梯度 5*5正方形結構元素
?
? 標準梯度 7*7正方形結構元素
?
函數:lhMorpGradient
說明:形態學基本梯度運算,通過結構元素的改變,可以進行厚梯度,方向梯度等形態學計算
參數:
src 輸入圖像
dst 輸出圖像
element結構元素
iterations膨脹和腐蝕次數
源碼:
void lhMorpGradient(const IplImage* src, IplImage* dst, IplConvKernel* element=NULL, int iterations=1)
{
?????? assert(src != NULL && dst != NULL && src != dst);
?????? IplImage*? temp = cvCloneImage(src);
?????? cvErode( src, temp, element, iterations );
??? cvDilate( src, dst, element, iterations );
??? cvSub( dst, temp, dst );
?????? cvReleaseImage(&temp);
}
總結
以上是生活随笔為你收集整理的标准梯度—lhMorpGradient的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: About the windchill
- 下一篇: Windows Phone 知识锦(12