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

當(dāng)前位置: 首頁 > news >正文

做社交網(wǎng)站多少錢網(wǎng)絡(luò)推廣是干什么的

做社交網(wǎng)站多少錢,網(wǎng)絡(luò)推廣是干什么的,如何做地方網(wǎng)站,做網(wǎng)站推廣客服好做么效果: Video: 區(qū)域增加分割 1、itkThresholdImageFilter 該類的主要功能是通過設(shè)置低閾值、高閾值或介于高低閾值之間,則將圖像值輸出為用戶指定的值。 如果圖像值低于、高于或介于設(shè)置的閾值之間,該類就將圖像值設(shè)置為用戶指定的“外部”值…

效果:

Video:

區(qū)域增加分割

1、itkThresholdImageFilter

該類的主要功能是通過設(shè)置低閾值、高閾值或介于高低閾值之間,則將圖像值輸出為用戶指定的值。

如果圖像值低于、高于或介于設(shè)置的閾值之間,該類就將圖像值設(shè)置為用戶指定的“外部”值(默認(rèn)情況下為“黑色”)。

該類并不對像素進(jìn)行二值化處理,輸出圖像中的像素值可以是浮點型或整型。

常用的成員函數(shù):

    Set/GetLower():設(shè)置/獲取下限閾值Set/GetUpper():設(shè)置/獲取上限閾值Set/GetOutsideValue():設(shè)置/獲取“外部”像素值ThresholdAbove():將大于或等于該閾值的值設(shè)置為OutsideValueThresholdBelow():將小于或等于該閾值的值設(shè)置為OutsideValueThresholdOutside():將超出上下限閾值范圍的值設(shè)置為 OutsideValue

?Example:

#include "itkImage.h"
#include "itkThresholdImageFilter.h";using namespace itk;const unsigned int  Dimension = 3;       //數(shù)據(jù)的Dimension
typedef signed short shortPixelType;
typedef itk::Image<shortPixelType, Dimension> ShortImageType;//圖像進(jìn)行閾值分割處理
bool thresholdImage(ShortImageType* image, ShortImageType* outImage)
{const short lowerThr = 200;      //設(shè)置下閾值const short upperThr = 1000;   //設(shè)置上閾值short outsideValue = 0; typedef ThresholdImageFilter<ShortImageType> thresholdFilterType;typename thresholdFilterType::Pointer thresholder = thresholdFilterType::New();thresholder->SetInput(image);thresholder->SetOutsideValue(outsideValue);設(shè)置上下閾值//thresholder->SetLower(lowerThr);//thresholder->SetUpper(upperThr);//<下閾值的值均設(shè)為outsideValuethresholder->ThresholdBelow(lowerThr);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}//>上閾值的值均設(shè)為outsideValuethresholder->ThresholdAbove(upperThr);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}//介于閾值之外的值均設(shè)為outsideValuethresholder->ThresholdOutside(lowerThr, upperThr);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}outImage = thresholder->GetOutput();return true;
}

2、itkBinaryThresholdImageFilter

2、itkBinaryThresholdImageFilter

該類的主要功能是通過閾值處理,將輸入圖像進(jìn)行二值化。

輸出的圖像像素只有兩個值:OutsideValue或者InsideValue,具體取決于相應(yīng)的輸入圖像像素是否位于高低閾值LowerThreshold和UpperThreshold之間,其中當(dāng)像素值等于任一閾值時,被認(rèn)為是在閾值之間。
?
?

注意:LowerThreshold不得大于UpperThreshold ,否則會引發(fā)異常。

因此,通常僅需要設(shè)置其中之一,具體取決于用戶是否希望閾值高于或低于期望閾值。

常用的成員函數(shù)

    Set/GetInsideValue():設(shè)置/獲取“內(nèi)部”像素值Set/GetOutsideValue():設(shè)置/獲取“外部”像素值Set/GetLowerThreshold():設(shè)置/獲取低閾值Set/GetUpperThreshold():設(shè)置/獲取高閾值

與itkThresholdImageFilter相比較,itkBinaryThresholdImageFilter更適用于將圖像根據(jù)兩個閾值進(jìn)行二值化處理,而itkThresholdImageFilter適用于將圖像中符合條件的像素值映射為特定的數(shù)值。

Example:

#include "itkImage.h"
#include "itkBinaryThresholdImageFilter.h";using namespace itk;const unsigned int  Dimension = 3;       //數(shù)據(jù)的Dimension
typedef signed short shortPixelType;
typedef itk::Image<shortPixelType, Dimension> ShortImageType;//圖像進(jìn)行二值化閾值分割處理
bool binaryThresholdImage(ShortImageType* image, ShortImageType* outImage)
{const short lowerThr = 0;      //設(shè)置二值化的下閾值const short upperThr = 1000;   //設(shè)置二值化的上閾值short backGround = 0;          //設(shè)置背景值short foreGround = 255;        //設(shè)置前景值typedef BinaryThresholdImageFilter<ShortImageType, ShortImageType> BThresholdFilterType;typename BThresholdFilterType::Pointer thresholder = BThresholdFilterType::New();thresholder->SetInput(image);thresholder->SetOutsideValue(backGround);thresholder->SetInsideValue(foreGround);thresholder->SetLowerThreshold(lowerThr);thresholder->SetUpperThreshold(upperThr);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}outImage = thresholder->GetOutput();return true;
}

3、itkOtsuThresholdImageFilter

該類的功能是使用最大類間方差法Otsu閾值設(shè)置圖像閾值。

最大類間方差法:是由日本學(xué)者大津(Nobuyuki Otsu)于1979年提出的,是一種自適合于雙峰情況的自動求取閾值的方法,又叫大津法,簡稱Otsu。是一種基于全局的二值化算法。

它是按圖像的灰度特性,將圖像分成背景和目標(biāo)兩部分。背景和目標(biāo)之間的類間方差越大,說明構(gòu)成圖像的2部分的差別越大,當(dāng)部分目標(biāo)錯分為背景或部分背景錯分為目標(biāo)都會導(dǎo)致2部分差別變小。因此,使類間方差最大的分割意味著錯分概率最小。

常用的成員函數(shù):

Set/GetInsideValue():設(shè)置/獲取“內(nèi)部”像素值
Set/GetOutsideValue():設(shè)置/獲取“外部”像素值
Set/GetReturnBinMidpoint():設(shè)置/獲取閾值是bin的中點還是最大值? 默認(rèn)值是 bin 最大值
ReturnBinMidpointOn():設(shè)置/獲取閾值是bin的中點還是最大值? 默認(rèn)值是 bin 最大值
VerifyPreconditions():驗證先決條件,驗證過程對象是否已正確配置、所有必需的輸入是否已設(shè)置以及所需的參數(shù)是否已正確設(shè)置, 如果無效,將拋出異常,在將 UpdateOutputInformation() 傳播到輸入之前調(diào)用此方法,ProcessObject 的實現(xiàn)驗證 m_NumberOfRequiredInputs 是否已設(shè)置且不為空

Code

#include "itkImage.h"
#include "itkOtsuThresholdImageFilter.h"using namespace itk;const unsigned int  Dimension = 3;       //數(shù)據(jù)的Dimension
typedef signed short shortPixelType;
typedef itk::Image<shortPixelType, Dimension> ShortImageType;bool OtsuThresholdImage(ShortImageType* image, ShortImageType* outImage)
{short outsideValue = 0;    //設(shè)置前景背景值short insideValue = 255;typedef OtsuThresholdImageFilter<ShortImageType, ShortImageType> OtsuThresholdFilterType;typename OtsuThresholdFilterType::Pointer thresholder = OtsuThresholdFilterType::New();thresholder->SetInput(image);thresholder->SetOutsideValue(outsideValue);thresholder->SetInsideValue(insideValue);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}outImage = thresholder->GetOutput();return true;
}

4、itkConnectedThresholdImageFilter

該類的功能是標(biāo)記連接到種子并位于值范圍內(nèi)的像素。

該類使用ReplaceValue標(biāo)記連接到初始種子且位于閾值下限和上限范圍內(nèi)的像素。

與itkThresholdImageFilter等前幾個類相比,它們雖然都是根據(jù)不同像素的灰度值或像素特征將圖像分割成不同的區(qū)域,但是此類不同的是基于連接像素的原理,通過選擇與種子像素相連的像素來進(jìn)行分割,分割的結(jié)果是連通區(qū)域,可以靈活地選擇不同的種子點和連接條件,得到不同的連通區(qū)域。

itkConnectedThresholdImageFilter適用于分割具有明顯邊界的目標(biāo),可以得到分割結(jié)果中目標(biāo)區(qū)域的邊界比較平滑。而itkThresholdImageFilter/itkBinaryThresholdImageFilter適用于分割目標(biāo)灰度值較高或較低的區(qū)域,可以得到目標(biāo)區(qū)域與背景的清晰分割

常用的成員函數(shù)

AddSeed():增加種子點
ClearSeeds():清除種子列表
SetSeed():設(shè)置種子點
GetSeeds():獲取種子容器
Set/GetLower():設(shè)置/獲取下限閾值
Set/GetUpper():設(shè)置/獲取上限閾值
Set/GetUpperInput():設(shè)置/獲取連接到管道的上閾值輸入
Set/GetLowerInput():設(shè)置/獲取連接到管道的下閾值輸入
SetConnectivity():要使用的連接類型(完全連接或 4(2D)、6(3D)、2*N(ND) 連接)
Set/GetReplaceValue():設(shè)置/獲取值以替換閾值像素, 介于Lower和Upper(含)內(nèi)的像素將被替換為該值, 默認(rèn)值為 1

Code:

#include "itkImage.h"
#include "itkConnectedThresholdImageFilter.h"using namespace itk;const unsigned int  Dimension = 3;       //數(shù)據(jù)的Dimension
typedef signed short shortPixelType;
typedef itk::Image<shortPixelType, Dimension> ShortImageType;bool connectedThresholdImage(ShortImageType* image, ShortImageType* outImage)
{const short lowerThr = 0;      //設(shè)置二值化的上下閾值const short upperThr = 1000;const short replaceValue = 255;ShortImageType::IndexType seed;seed[0] = 100;     //該值必須在圖像的三維大小范圍內(nèi)seed[1] = 100;seed[2] = 25;typedef ConnectedThresholdImageFilter<ShortImageType, ShortImageType> ConnectedThresholdFilterType;typename ConnectedThresholdFilterType::Pointer thresholder = ConnectedThresholdFilterType::New();thresholder->SetInput(image);thresholder->SetLower(lowerThr);thresholder->SetUpper(upperThr);thresholder->SetReplaceValue(replaceValue);thresholder->SetSeed(seed);try{thresholder->Update();}catch (itk::ExceptionObject& ex){//讀取過程發(fā)生錯誤std::cerr << "Error: " << ex << std::endl;return false;}outImage = thresholder->GetOutput();return true;
}

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

相關(guān)文章:

  • 珠海網(wǎng)站推廣優(yōu)化最近的新聞大事20條
  • 建設(shè)網(wǎng)站公司 優(yōu)幫云seo外鏈推廣工具下載
  • 論壇網(wǎng)站建設(shè)用工具軟件上海關(guān)鍵詞優(yōu)化公司哪家好
  • 網(wǎng)站建設(shè)合同附件格式搜索引擎有哪些類型
  • b2b網(wǎng)站有那些企業(yè)網(wǎng)站優(yōu)化排名
  • 麻涌鎮(zhèn)網(wǎng)站建設(shè)做網(wǎng)頁多少錢一個頁面
  • 基于b s結(jié)構(gòu)做的網(wǎng)站寧波seo軟件免費課程
  • 浙江省專業(yè)網(wǎng)站制作網(wǎng)站建設(shè)優(yōu)化近義詞
  • 京東網(wǎng)站建設(shè)的特點網(wǎng)絡(luò)域名怎么查
  • 百度網(wǎng)站建設(shè)是什么志鴻優(yōu)化網(wǎng)官網(wǎng)
  • 黃山搜索引擎優(yōu)化dz論壇seo
  • 美工素材網(wǎng)站有哪些安徽搜索引擎優(yōu)化seo
  • asp.net網(wǎng)站運行助手推廣app的營銷方案
  • 燈飾外貿(mào)網(wǎng)站百度手機助手app
  • 后臺系統(tǒng)免費模板網(wǎng)站免費游戲推廣平臺
  • 姑蘇區(qū)做網(wǎng)站seo教程搜索引擎優(yōu)化入門與進(jìn)階
  • 煙臺定制網(wǎng)站建設(shè)報價seo工具是什么意思
  • 國示范校建設(shè)網(wǎng)站品牌廣告語經(jīng)典100條
  • 網(wǎng)站后綴twnba最新消息球員交易
  • 網(wǎng)站建設(shè)的業(yè)務(wù)范圍手游推廣個人合作平臺
  • 在網(wǎng)站上做網(wǎng)絡(luò)課堂軟件多少錢線上營銷推廣方案
  • 網(wǎng)站建設(shè) 資質(zhì)昆明網(wǎng)絡(luò)推廣
  • 動態(tài)html做網(wǎng)站背景離我最近的廣告公司
  • 收費搭建網(wǎng)站多地優(yōu)化完善疫情防控措施
  • 做網(wǎng)站后期維護工資貼吧西安百度推廣外包
  • 網(wǎng)站建設(shè)內(nèi)部流程圖營銷策略有哪些
  • 合肥網(wǎng)站建設(shè)推廣百度網(wǎng)站大全舊版
  • 十堰網(wǎng)站設(shè)計營銷團隊公司
  • 百度網(wǎng)站排名優(yōu)化軟件蘇州網(wǎng)站關(guān)鍵詞優(yōu)化推廣
  • 廣饒網(wǎng)站建設(shè)優(yōu)化設(shè)計七年級上冊數(shù)學(xué)答案