Skip to content

Commit 7340e51

Browse files
chore(repo): 저장소 정비 - CI / 이슈·PR 템플릿 / 에디터 규칙
GitHub 저장소를 프로젝트 성격에 맞게 정비한다. - .github/workflows/ci.yml : windows-latest(MSVC) + ubuntu-latest(g++) matrix. 패키지 설치 스텝을 의도적으로 두지 않았다. 리눅스에서 빌드된다는 사실 자체가 "Phase 1 외부 의존성 0" 의 증거이며, 설치 스텝이 추가되는 순간이 회귀 신호다. - .github/ISSUE_TEMPLATE : 이 프로젝트의 이슈는 "값이 HALCON 과 다르다" 가 핵심이므로 value_mismatch(수치 대조표 필수) / new_operator(정의->검증->구현 준수 확인) 폼을 도메인에 맞춰 작성. - .github/pull_request_template.md : 정확도 게이트 체크리스트 17항목. 곡선 도형 기댓값을 연속 기하로 잡지 않았는지 확인하는 항목 포함. - .editorconfig : 탭 들여쓰기 + C++ 소스만 utf-8-bom (BOM 없는 한글 주석은 VS 가 CP949 로 오독해 다음 줄을 삼킨다) - .gitattributes : 확장자별 EOL 확정. 커밋 시 대량 발생하던 CRLF 경고 해소. docs/reference 는 linguist-documentation 으로 언어 통계에서 제외. - CONTRIBUTING.md : CLAUDE.md 로 위임하는 입구 문서 - README : CI 배지 + CONTRIBUTING 링크 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b412f05 commit 7340e51

9 files changed

Lines changed: 583 additions & 0 deletions

File tree

.editorconfig

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# =====================================================================================
2+
# .editorconfig — 코딩 규칙 강제 (CLAUDE.md §4.1 / §4.2)
3+
#
4+
# Visual Studio 2015+ / VS Code / CLion 이 자동으로 읽는다.
5+
# https://editorconfig.org
6+
# =====================================================================================
7+
root = true
8+
9+
# -------------------------------------------------------------------------------------
10+
# 공통
11+
# -------------------------------------------------------------------------------------
12+
[*]
13+
charset = utf-8
14+
indent_style = tab
15+
indent_size = 4
16+
tab_width = 4
17+
end_of_line = crlf
18+
insert_final_newline = true
19+
trim_trailing_whitespace = true
20+
21+
# -------------------------------------------------------------------------------------
22+
# C++ 소스 — UTF-8 BOM 필수
23+
#
24+
# ※ BOM 이 없는 UTF-8 한글 주석은 Visual Studio 가 CP949 로 오독해
25+
# 주석 다음 줄을 통째로 삼킨다. 컴파일은 성공하는데 코드가 사라지는 형태라
26+
# 추적이 극히 어렵다. 이 항목은 타협 대상이 아니다. (CLAUDE.md §4.2)
27+
# -------------------------------------------------------------------------------------
28+
[*.{h,hpp,inl,c,cpp}]
29+
charset = utf-8-bom
30+
indent_style = tab
31+
end_of_line = crlf
32+
33+
# -------------------------------------------------------------------------------------
34+
# 문서 — BOM 없는 UTF-8, LF
35+
#
36+
# 마크다운은 줄 끝 공백 2개가 강제 개행 문법이므로 trailing whitespace 를 보존한다.
37+
# -------------------------------------------------------------------------------------
38+
[*.md]
39+
charset = utf-8
40+
end_of_line = lf
41+
trim_trailing_whitespace = false
42+
43+
# -------------------------------------------------------------------------------------
44+
# 빌드 설정
45+
# -------------------------------------------------------------------------------------
46+
[{CMakeLists.txt,*.cmake}]
47+
charset = utf-8
48+
indent_style = tab
49+
end_of_line = lf
50+
51+
# -------------------------------------------------------------------------------------
52+
# YAML — 스펙상 탭 사용 불가. 반드시 스페이스 2칸
53+
# -------------------------------------------------------------------------------------
54+
[*.{yml,yaml}]
55+
charset = utf-8
56+
indent_style = space
57+
indent_size = 2
58+
end_of_line = lf
59+
60+
[*.json]
61+
charset = utf-8
62+
indent_style = space
63+
indent_size = 2
64+
end_of_line = lf
65+
66+
# -------------------------------------------------------------------------------------
67+
# 배치 스크립트 — CRLF 고정
68+
# -------------------------------------------------------------------------------------
69+
[*.{bat,cmd}]
70+
charset = utf-8
71+
end_of_line = crlf
72+
73+
# -------------------------------------------------------------------------------------
74+
# 메타 파일
75+
# -------------------------------------------------------------------------------------
76+
[{.gitattributes,.gitignore,.editorconfig}]
77+
charset = utf-8
78+
end_of_line = lf

.gitattributes

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# =====================================================================================
2+
# .gitattributes — 줄바꿈(EOL) 정규화 및 언어 통계 설정
3+
#
4+
# 저장소 안(index)에는 항상 LF 로 저장하고,
5+
# 체크아웃 시 파일 종류에 따라 작업트리 EOL 을 확정한다.
6+
# -> "LF will be replaced by CRLF" 경고가 사라진다.
7+
#
8+
# ※ 이 파일을 추가한 뒤 한 번은 아래로 재정규화해야 한다.
9+
# git add --renormalize .
10+
# git commit -m "chore: EOL 재정규화"
11+
# =====================================================================================
12+
13+
# 기본 — Git 이 텍스트/바이너리를 판별하고 index 는 LF 로 정규화
14+
* text=auto
15+
16+
# -------------------------------------------------------------------------------------
17+
# C++ 소스 — Visual Studio 환경이므로 작업트리는 CRLF
18+
# -------------------------------------------------------------------------------------
19+
*.h text eol=crlf
20+
*.hpp text eol=crlf
21+
*.c text eol=crlf
22+
*.cpp text eol=crlf
23+
*.inl text eol=crlf
24+
25+
# MFC / VS 프로젝트 파일
26+
*.sln text eol=crlf
27+
*.vcxproj text eol=crlf
28+
*.filters text eol=crlf
29+
*.props text eol=crlf
30+
31+
# 배치 스크립트 — CRLF 가 아니면 cmd.exe 가 오작동한다
32+
*.bat text eol=crlf
33+
*.cmd text eol=crlf
34+
35+
# -------------------------------------------------------------------------------------
36+
# 문서 / 빌드 설정 — LF
37+
# -------------------------------------------------------------------------------------
38+
*.md text eol=lf
39+
CMakeLists.txt text eol=lf
40+
*.cmake text eol=lf
41+
*.yml text eol=lf
42+
*.yaml text eol=lf
43+
*.json text eol=lf
44+
*.sh text eol=lf
45+
.gitattributes text eol=lf
46+
.gitignore text eol=lf
47+
.editorconfig text eol=lf
48+
49+
# -------------------------------------------------------------------------------------
50+
# 바이너리 — 절대 EOL 변환 금지
51+
# -------------------------------------------------------------------------------------
52+
*.png binary
53+
*.jpg binary
54+
*.jpeg binary
55+
*.bmp binary
56+
*.tif binary
57+
*.tiff binary
58+
*.gif binary
59+
*.ico binary
60+
*.pdf binary
61+
*.zip binary
62+
*.7z binary
63+
*.lib binary
64+
*.dll binary
65+
*.exe binary
66+
*.obj binary
67+
*.pdb binary
68+
*.pptx binary
69+
*.xlsx binary
70+
*.docx binary
71+
72+
# -------------------------------------------------------------------------------------
73+
# linguist — 언어 통계 / diff 표시 조정
74+
#
75+
# docs/reference/halcon13/ 는 HALCON 13 원문을 복원한 "수집 아카이브"다.
76+
# 본 저장소가 작성한 코드가 아니므로 언어 통계에서 제외한다.
77+
# -------------------------------------------------------------------------------------
78+
docs/reference/halcon13/*.md linguist-documentation=true
79+
docs/reference/** linguist-documentation=true
80+
81+
# 소스는 반드시 언어 통계에 잡히게 한다
82+
src/** linguist-detectable=true
83+
include/** linguist-detectable=true
84+
test/** linguist-detectable=true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: 작업 지침 (필독)
4+
url: https://github.com/DevForge-Vision/Halcon-Library/blob/main/CLAUDE.md
5+
about: 이 저장소의 원칙 · 함정 14건 · 코딩 규칙 · 작업 절차. 이슈를 쓰기 전에 먼저 읽어 주세요.
6+
- name: 특징값 정의서
7+
url: https://github.com/DevForge-Vision/Halcon-Library/blob/main/docs/02_DEFINITIONS.md
8+
about: 구현의 유일한 근거. 값 관련 질문은 대부분 여기에 답이 있습니다.
9+
- name: 검증 계획과 기댓값
10+
url: https://github.com/DevForge-Vision/Halcon-Library/blob/main/docs/03_VERIFICATION.md
11+
about: 기준 도형 S1~S7 정의와 손계산 기댓값, 허용 오차 기준.
12+
- name: 구현 노트 (값이 안 맞을 때 먼저 볼 것)
13+
url: https://github.com/DevForge-Vision/Halcon-Library/blob/main/docs/04_IMPLEMENTATION_NOTES.md
14+
about: 디지털 원의 체인코드가 2πR 보다 +5.5% 크다는 점 등, 오해하기 쉬운 실측 결과 정리.
15+
- name: 기여 방법
16+
url: https://github.com/DevForge-Vision/Halcon-Library/blob/main/CONTRIBUTING.md
17+
about: 빌드 · 테스트 · PR 절차 요약.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: 오퍼레이터 추가 요청
2+
description: HALCON 13 Regions/Features 오퍼레이터를 새로 구현해 달라고 요청합니다.
3+
title: "[추가] "
4+
labels: ["new-operator"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
> **값이 틀린 40종보다, 값이 맞는 5종이 낫습니다.**
10+
> 추가 요청은 "왜 필요한가"가 곧 우선순위입니다. 실제 검사 용도를 구체적으로 적어 주세요.
11+
12+
- type: input
13+
id: operator
14+
attributes:
15+
label: 오퍼레이터 이름 (HALCON 원명)
16+
description: HALCON 문서에 나오는 이름 그대로 적어 주세요. 임의로 바꾸지 마세요.
17+
placeholder: "예) elliptic_axis"
18+
validations:
19+
required: true
20+
21+
- type: dropdown
22+
id: group
23+
attributes:
24+
label: 원문 그룹 파일
25+
description: "`docs/reference/halcon13/` 의 어느 파일에 원문이 수집되어 있는지 고르세요."
26+
options:
27+
- G1_basic_size.md
28+
- G2_shape_factors.md
29+
- G3_geometry_runlength.md
30+
- G4_moments.md
31+
- G5_select_relation.md
32+
- 아카이브에 없음 (원문 수집부터 필요)
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: reference-url
38+
attributes:
39+
label: 원문 링크
40+
description: MVTec HALCON 13 Reference 의 해당 오퍼레이터 페이지 URL.
41+
placeholder: "https://www.mvtec.com/doc/halcon/13/en/..."
42+
43+
- type: textarea
44+
id: reason
45+
attributes:
46+
label: 필요한 이유
47+
description: |
48+
어느 공정(코터 / 슬리터 / 롤프레스)의 어떤 불량 판별에 쓰는지 구체적으로 적어 주세요.
49+
"있으면 좋을 것 같아서" 는 우선순위가 가장 낮습니다.
50+
placeholder: |
51+
예) 코터 바타입 — 스크래치와 이물을 구분해야 하는데, 면적/원형도만으로는 겹친다.
52+
장축/단축비(elliptic_axis 기반 anisometry)가 있으면 가늘고 긴 스크래치를 분리할 수 있다.
53+
validations:
54+
required: true
55+
56+
- type: textarea
57+
id: known-traps
58+
attributes:
59+
label: 알려진 함정 (선택)
60+
description: "`docs/00_OVERVIEW.md` §5 의 함정 14건 중 이 오퍼레이터와 관련된 것이 있으면 적어 주세요."
61+
placeholder: "예) 함정 #11 — elliptic_axis 의 Phi 부호 규약"
62+
63+
- type: checkboxes
64+
id: process
65+
attributes:
66+
label: 진행 순서 확인 (필수)
67+
description: 이 저장소는 순서를 어긴 구현을 받지 않습니다. 정의가 틀린 채로 짠 코드는 전부 폐기입니다.
68+
options:
69+
- label: "**정의 → 검증 → 구현** 순서를 지킬 것에 동의합니다. (`docs/02_DEFINITIONS.md` 작성 → `docs/03_VERIFICATION.md` 기댓값 손계산 → 그 다음 코드)"
70+
required: true
71+
- label: 근거는 `docs/reference/halcon13/` 의 원문이며, OpenCV 관례나 일반적인 컴퓨터비전 통념으로 대체하지 않겠습니다.
72+
required: true
73+
- label: 원문에 명시가 없으면 추측으로 채우지 않고 **미결 쟁점**으로 등록하겠습니다.
74+
required: true
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
name: 값 불일치 리포트
2+
description: 본 라이브러리의 계산값이 HALCON 실측값과 다를 때 사용합니다. 이 저장소에서 가장 중요한 이슈 유형입니다.
3+
title: "[값 불일치] "
4+
labels: ["value-mismatch", "priority-high"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
> **이 프로젝트의 유일한 성공 기준은 "HALCON 실측값과 일치하는가" 입니다.**
10+
> 값 불일치는 최우선 처리 대상입니다. 아래 항목을 최대한 채워 주세요.
11+
>
12+
> 값이 아니라 크래시 · 빌드 오류 · 성능 문제라면 blank issue 를 사용해 주세요.
13+
14+
- type: dropdown
15+
id: operator
16+
attributes:
17+
label: 오퍼레이터
18+
description: 값이 어긋난 오퍼레이터를 고르세요.
19+
options:
20+
- area_center
21+
- contlength
22+
- circularity
23+
- compactness
24+
- convexity
25+
- 기타 (아래 본문에 이름을 적어 주세요)
26+
validations:
27+
required: true
28+
29+
- type: dropdown
30+
id: shape
31+
attributes:
32+
label: 시험 도형
33+
description: "`docs/03_VERIFICATION.md` §2 의 기준 도형 ID 입니다."
34+
options:
35+
- S1 정사각형 100x100
36+
- S2 원판 R=50
37+
- S3 링(도넛)
38+
- S4 가로선 1x100
39+
- S5 L자
40+
- S6 단일 픽셀
41+
- S7 빈 리전
42+
- 실제 검사 이미지 (아래에 조건을 기재)
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: values
48+
attributes:
49+
label: 수치 대조
50+
description: 상대오차 = |본 라이브러리 − HALCON| / |HALCON| 입니다. 소수점을 자르지 말고 원본 그대로 붙여 주세요.
51+
value: |
52+
| 항목 | 값 |
53+
|---|---|
54+
| HALCON 실측값 | |
55+
| 본 라이브러리 값 | |
56+
| 상대오차 | |
57+
validations:
58+
required: true
59+
60+
- type: input
61+
id: halcon-version
62+
attributes:
63+
label: HALCON 버전
64+
description: 본 라이브러리의 근거 원문은 HALCON 13 입니다. 다른 버전이면 정의 자체가 다를 수 있습니다.
65+
placeholder: "예) HALCON 13.0.1.1 Progress / HDevelop"
66+
validations:
67+
required: true
68+
69+
- type: textarea
70+
id: repro
71+
attributes:
72+
label: 재현 코드
73+
description: HDevelop 스크립트와 C++ 호출 코드를 같이 주시면 가장 빠릅니다.
74+
render: cpp
75+
validations:
76+
required: true
77+
78+
- type: input
79+
id: definition-section
80+
attributes:
81+
label: 관련 정의서 절
82+
description: "`docs/02_DEFINITIONS.md` 의 어느 절에 해당하는 값인지 적어 주세요."
83+
placeholder: "예) docs/02_DEFINITIONS.md §4.4 compactness"
84+
validations:
85+
required: true
86+
87+
- type: textarea
88+
id: analysis
89+
attributes:
90+
label: 추정 원인 (선택)
91+
description: |
92+
짚이는 곳이 있으면 적어 주세요. 자주 나오는 원인은 다음과 같습니다.
93+
- 곡선 도형의 기댓값을 연속 기하 공식(2πR 등)으로 잡음 → `docs/04_IMPLEMENTATION_NOTES.md` §3
94+
- 클리핑 방향 혼동 (circularity 는 min, compactness 는 max)
95+
- convexity 분자/분모 뒤집힘
96+
- 좌표계 혼동 (HALCON 은 row/col, OpenCV 는 x/y)
97+
98+
- type: checkboxes
99+
id: confirm
100+
attributes:
101+
label: 확인
102+
options:
103+
- label: "`docs/04_IMPLEMENTATION_NOTES.md` §3 (디지털 원의 체인코드는 2πR 보다 +5.5% 크다) 을 읽었고, 이 편차를 원인에서 배제했습니다."
104+
required: true
105+
- label: 최신 main 브랜치에서 재현했습니다.
106+
required: true

0 commit comments

Comments
 (0)