labels_to_indices — REPRCONV index op

• 데이터 종류: labels → indices

• 호출: import fullseye as fs; fs.ledger.labels_to_indices(labels)(구현을 직접 호출하려면 import reprconv; reprconv.labels_to_indices(labels), 원장에서 가져오려면 opsreprconv.get("labels_to_indices"))

사용법

labels → 배경이 아닌 인덱스 (N,). indices_to_labels 의 반대 방향.

2-D 이상의 라벨 영상도 받는다 —— 그 경우의 첨자는 labels.ravel() 에 대한 첨자(C 순서)이다. np.unravel_index 로좌표로 되돌릴 수 있지만, 되돌리려면 원래의 shape 가 필요하므로, 이 방향은 shape 를 버리고 있다(비가역).

Args:

labels: 임의 차원의 정수/실수 라벨 배열.

Returns:

(N,) int64. 라벨이 0 이 아닌 위치의 평탄 첨자(오름차순).

Raises:

ValueError: 비었다 / 비유한 / 비배경이 1 개도 없다.

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

• 알고리즘의 정전(저자·연도)과 용도는 위의 패밀리 사용 가이드에 적혀 있습니다.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

• representation_conversion — py -3.11 examples/representation_conversion.py

타입이 이어지는 다음 연산자(indices 를 입력으로 받는 것)

indices_to_labels · select_points

같은 카테고리(index)

indices_to_labels · select_points


*Provenance: reprconv.py — REPRCONV 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.