🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.features
クラス SimpleBlobDetector
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.features.Feature2D
-
- org.opencv.features.SimpleBlobDetector
-
public class SimpleBlobDetector extends Feature2D
Class for extracting blobs from an image. : The class implements a simple algorithm for extracting blobs from an image: 1. Convert the source image to binary images by applying thresholding with several thresholds from minThreshold (inclusive) to maxThreshold (exclusive) with distance thresholdStep between neighboring thresholds. 2. Extract connected components from every binary image by findContours and calculate their centers. 3. Group centers from several binary images by their coordinates. Close centers form one group that corresponds to one blob, which is controlled by the minDistBetweenBlobs parameter. 4. From the groups, estimate final centers of blobs and their radiuses and return as locations and sizes of keypoints. This class performs several filtrations of returned blobs. You should set filterBy\* to true/false to turn on/off corresponding filtration. Available filtrations:- 色による。このフィルタは、ブロブの中心における二値画像の強度を blobColor と比較する。両者が異なる場合、そのブロブは除外される。暗いブロブを抽出するには blobColor = 0 を、明るいブロブを抽出するには blobColor = 255 を使う。
- 面積による。抽出されるブロブは、minArea(含む)と maxArea(含まない)の間の面積を持つ。
- 円形度による。抽出されたブロブは minCircularity(含む)から maxCircularity(含まない)の間の円形度(\(\frac{4*\pi*Area}{perimeter * perimeter}\))を持つ。
- 最小慣性と最大慣性の比による。抽出されるブロブは、minInertiaRatio(含む)と maxInertiaRatio(含まない)の間のこの比を持つ。
- 凸性による。抽出されるブロブは、minConvexity(含む)と maxConvexity(含まない)の間の凸性(面積 / ブロブの凸包の面積)を持つ。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedSimpleBlobDetector​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static SimpleBlobDetector__fromPtr__​(long addr)static SimpleBlobDetectorcreate()Flag to enable contour collection.static SimpleBlobDetectorcreate​(SimpleBlobDetector_Params parameters)Flag to enable contour collection.java.util.List<MatOfPoint>getBlobContours()Returns the contours of the blobs detected during the last call to detect().java.lang.StringgetDefaultName()Returns the algorithm string identifier.SimpleBlobDetector_ParamsgetParams()voidsetParams​(SimpleBlobDetector_Params params)-
クラス org.opencv.features.Feature2D から継承されたメソッド
compute, compute, defaultNorm, descriptorSize, descriptorType, detect, detect, detect, detect, detectAndCompute, detectAndCompute, empty, read, write
-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, getNativeObjAddr, save
-
-
-
-
メソッドの詳細
-
__fromPtr__
public static SimpleBlobDetector __fromPtr__​(long addr)
-
create
public static SimpleBlobDetector create​(SimpleBlobDetector_Params parameters)
Flag to enable contour collection. If set to true, the detector will store the contours of the detected blobs in memory, which can be retrieved after the detect() call using getBlobContours(). 覚え書き: Default value is false.- 引数:
parameters- 自動生成- 戻り値:
- 自動生成
-
create
public static SimpleBlobDetector create()
Flag to enable contour collection. If set to true, the detector will store the contours of the detected blobs in memory, which can be retrieved after the detect() call using getBlobContours(). 覚え書き: Default value is false.- 戻り値:
- 自動生成
-
setParams
public void setParams​(SimpleBlobDetector_Params params)
-
getParams
public SimpleBlobDetector_Params getParams()
-
getDefaultName
public java.lang.String getDefaultName()
Description copied from class:AlgorithmReturns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.- オーバーライド:
- クラス
Feature2D内のgetDefaultName - 戻り値:
- 自動生成
-
getBlobContours
public java.util.List<MatOfPoint> getBlobContours()
Returns the contours of the blobs detected during the last call to detect(). 覚え書き: The REF: Params::collectContours parameter must be set to true before calling detect() for this method to return any data.- 戻り値:
- 自動生成
-
-