🤖 AIによる機械翻訳(非公式) — これは OpenCV 4.13.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
Package org.opencv.ximgproc
クラス SuperpixelLSC
- java.lang.Object
-
- org.opencv.core.Algorithm
-
- org.opencv.ximgproc.SuperpixelLSC
public class SuperpixelLSC extends Algorithm
CITE: LiCVPR2015LSC で説明されているLSC (Linear Spectral Clustering) スーパーピクセルアルゴリズムを実装したクラス。LSC (Linear Spectral Clustering) は、低い計算コストでコンパクトかつ均一なスーパーピクセルを生成する。基本的には、画像ピクセル間の色の類似性と空間的な近接性を測る類似度尺度に基づき、スーパーピクセルセグメンテーションに正規化カット (normalized cuts) の定式化を採用している。LSCは計算量が線形でメモリ効率が高く、画像の大域的な性質を保持できる。
-
-
コンストラクタの要約
コンストラクタ Modifier Constructor Description protectedSuperpixelLSC​(long addr)
-
メソッドの要約
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド Modifier and Type Method Description static SuperpixelLSC__fromPtr__​(long addr)voidenforceLabelConnectivity()Enforce label connectivity.voidenforceLabelConnectivity​(int min_element_size)Enforce label connectivity.voidgetLabelContourMask​(Mat image)Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.voidgetLabelContourMask​(Mat image, boolean thick_line)Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.voidgetLabels​(Mat labels_out)Returns the segmentation labeling of the image.intgetNumberOfSuperpixels()Calculates the actual amount of superpixels on a given segmentation computed and stored in SuperpixelLSC object.voiditerate()Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelLSC object.voiditerate​(int num_iterations)Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelLSC object.-
クラス org.opencv.core.Algorithm から継承されたメソッド
clear, empty, getDefaultName, getNativeObjAddr, save
-
-
-
-
メソッドの詳細
-
__fromPtr__
public static SuperpixelLSC __fromPtr__​(long addr)
-
getNumberOfSuperpixels
public int getNumberOfSuperpixels()
Calculates the actual amount of superpixels on a given segmentation computed and stored in SuperpixelLSC object.- 戻り値:
- 自動生成
-
iterate
public void iterate​(int num_iterations)
Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelLSC object. This function can be called again without the need of initializing the algorithm with createSuperpixelLSC(). This save the computational cost of allocating memory for all the structures of the algorithm.- 引数:
num_iterations- 反復回数。数を増やすと結果が改善される。この関数は、createSuperpixelLSC() 関数で初期化された引数を用いて画像のスーパーピクセルセグメンテーションを計算する。アルゴリズムはスーパーピクセルのグリッドから開始し、エッジ境界の更新を提案して境界を洗練する。
-
iterate
public void iterate()
Calculates the superpixel segmentation on a given image with the initialized parameters in the SuperpixelLSC object. This function can be called again without the need of initializing the algorithm with createSuperpixelLSC(). This save the computational cost of allocating memory for all the structures of the algorithm. The function computes the superpixels segmentation of an image with the parameters initialized with the function createSuperpixelLSC(). The algorithms starts from a grid of superpixels and then refines the boundaries by proposing updates of edges boundaries.
-
getLabels
public void getLabels​(Mat labels_out)
Returns the segmentation labeling of the image. Each label represents a superpixel, and each pixel is assigned to one superpixel label.- 引数:
labels_out- 戻り値: スーパーピクセルセグメンテーションのラベルを格納したCV_32SC1整数配列。ラベルは [0, getNumberOfSuperpixels()] の範囲にある。この関数は、スーパーピクセルセグメンテーションのラベルを持つ画像を返す。ラベルは [0, getNumberOfSuperpixels()] の範囲にある。
-
getLabelContourMask
public void getLabelContourMask​(Mat image, boolean thick_line)
Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.- 引数:
image- 戻り値: CV_8U1の画像マスク。-1はそのピクセルがスーパーピクセルの境界であることを示し、それ以外は0となる。thick_line- falseの場合、境界は1ピクセル幅のみとなる。そうでない場合は境界上のすべてのピクセルがマスクされる。この関数はスーパーピクセルセグメンテーションの境界を返す。
-
getLabelContourMask
public void getLabelContourMask​(Mat image)
Returns the mask of the superpixel segmentation stored in SuperpixelLSC object.- 引数:
image- 戻り値: CV_8U1の画像マスク。-1はそのピクセルがスーパーピクセルの境界であることを示し、それ以外は0となる。がマスクされる。この関数はスーパーピクセルセグメンテーションの境界を返す。
-
enforceLabelConnectivity
public void enforceLabelConnectivity​(int min_element_size)
Enforce label connectivity.- 引数:
min_element_size- より大きなスーパーピクセルに吸収されるべき最小の要素サイズ(パーセント)。結果として得られる平均スーパーピクセルサイズに対して、有効な値は0〜100の範囲とする。25は4分の1未満のサイズのスーパーピクセルを吸収すべきことを意味し、これがデフォルトである。この関数は小さすぎるコンポーネントを併合し、先に見つかった隣接ラベルをそのコンポーネントに割り当てる。この関数を呼び出すと、最終的なスーパーピクセル数が変わることがある。
-
enforceLabelConnectivity
public void enforceLabelConnectivity()
Enforce label connectivity. superpixel. Given resulted average superpixel size valid value should be in 0-100 range, 25 means that less then a quarter sized superpixel should be absorbed, this is default. The function merge component that is too small, assigning the previously found adjacent label to this component. Calling this function may change the final number of superpixels.
-
-