Tool : Visual C++ 6.0 Library & Utilized : OpenCV 1.0 Reference : Learning OpenCV Book etc. : -
This code is to test OpenCV functions those are cvCanny, cvGoodFeaturesToTrack.
It is simple and easy. But the method of function use is easy to forget in long time past. And It is useful to OpenCV Beginner.
If you have good idea or advanced opinion, please reply me. Thank you (Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)------------------------------------------------------------
OpenCV 에 있는 cvCanny, cvGoodFeaturesToTrack 함수를 사용한 소스입니다.
결과는 위 그림과 같습니다.
이 함수를 사용하시는 분 참고하시면 빠르게 적용할 수 있을거라 생각합니다. <here>
If you have good idea or advanced opinion, please reply me. Thank you (Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)
<실험 1>
1. 입력 데이터
2. 에지 영상
3. Line 검출 결과
4. Parameter Space voting 영상
▣ 소스 코드 설명
1. Line 검출
①voting 부분
theta를 0~180까지 증가시키면서 rho를 구하고 그 값을 [theta][rho]의 2차원 배열에 Voting한다.
②Sorting 부분
voting된 Parameter를 정렬한다. 정렬은 STL을 사용함.
③Line 그리는 부분
정렬된 theta와 rho값을 이용하여 직선의 방정식의 기울기와 절편을 구하고 OpenCV에 Line Draw함수를 이용하여 라인을 그린다. 그려진 라인은 OpenCV의 IplImage에 저장된다.
라인을 그릴 때는 voting이 가장 많이 된 것의 선색을 255, 가장 voting이 안된 것의 선 색을 0으로, Voting된 것의 정도를 색으로 나타내었다.
2. Circle 검출
①voting 부분
반지름을 <10>에서 <이미지 대각방향의 픽셀 길이 빼기 10>까지 증가시키면서 theta를 0~360까지 증가시키며, 원의 중심 위치 Cx, Cy에 대하여 voting을 한다. voting된 결과는 를 담을 수 있는 Vector에 저장된다.
②Sorting 부분 의 정보를 갖고 있는 Vector에서 Voring 값으로 정렬을 한다.
③Circle 그리는 부분
정렬된 원중에서 상위 1%만 드로잉한다.
드로잉할 때는 라인을 그릴때와 마찬가지로 제일 많이 voting된 것을 255색, 제일 적게 voting된것을 0색으로 그려서 voting정도를 표시한다.
▣ 인터페이스 설명
실행 파일을 실행하여 파일명을 입력하고, Line을 검출하려면 1을 입력 Circle을 검출하려면 2를 입력한다.
검출이 끝나면 실행 시간이 나온다.
Tool : Visual C++ 6.0 Library & Utilized : OpenGL Reference : OpenGL reference etc. : -
This program is made for testing OpenGL properties.
The code test Light Position, Ambient, Diffuse, Specular and Surface Roughness.
I have made the program form view style interface.
We can adjust values by slide bar.
You can download entitle source code. < Here >
If you have good idea or advanced opinion, please reply me. Thank you (Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)
Tool : Matlab / Visual C++ 6.0 Library & Utilized : - / OpenGL Reference : Shape from Shading, Photometric Stereo reference etc. : -
Shading Source Images
Depth Image Normal Vector
Shading Source Images
Depth Image Normal Vector
Shading Source Images
Depth Image Normal Vector
This program make 3D shape using several different source of light.
The result is normal vector figure and 3D depth image.
This method is alternatively called as Photometric stereo.
If you have good idea or advanced opinion, please reply me. Thank you
(Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)
Tool : Visual Studio C++ 6.0 Library & Utilized : - Reference : Canny Edge's Paper and Reference tutorial etc. : -
1. Input
First, enter the file name of bmp format.
And input parameters. (sigma value, Hysteresis low, high value. Default values are 1.0, 20, 80 respectively).
2. Results
3 files saved in your folder that direction is same with exe file location.
Origin Image
One is differential of Gaussian image and the others are NonMax Supression and Hysteresis image.
If you have good idea or advanced opinion, please reply me. Thank you
(Please understand my bad english ability. If you point out my mistake, I would correct pleasurably. Thank you!!)------------------------------------------------------
1. DOG 부분
마스크를 만든다.
마스크를 이미지에 회선하면서 컨볼루션한다. 한번 회선할 때 가로, 세로에 대하여 모두 연산함 2. NonMax Supression 부분
에지의 방향의 노말방향에 대하여 좌우 픽셀의 밝기보다 큰지 작은지를 조사한다.
∴단 기존의 방법으로 인접한 같은 픽셀값은 최대값을 찾지 못하고 손실되기 때문에, 인접한 픽셀값을 만났을 때는 자기 자신을 -1하여 값을 낮춘다.
예) 55 100 100 100 55 -> 55 99 100 100 55 -> 55 99 99 100 55 -> 0 0 0 100 0
3. Hysteresis Thresholding 부분
에지의 방향에 대하여 픽셀은 추적하면 에지의 방향과 픽셀의 위치가 다르기 때문에 끊어지는 현상이 자주 발생하므로 에지의 방향을 이용하지 않고 잔디에 불을 붙여 연결된 픽셀을 추적하는 GlassFire 방법을 사용하여 High값과 Low값의 개념을 그대로 적용하여 사용한다.
tempImg라는 임시 버퍼를 하나 만들어 방문했던 픽셀의 위치에 대하여 표시를 해둔다.
danji()함수는 재귀호출로 인접한 픽셀을 모두 검색해준다.
danji()함수는 8방향에 대하여 Low값보다 큰 픽셀에 대하여 불을 붙이듯 재귀호출을 하여 선을 이어간다.
▣ 인터페이스 설명
실행 파일을 실행하여 파일명, 시그마값, Hysteresis의 low, high값을 입력한다.
결과는 DOG.bmp, NonMax.bmp, Hysteresis.bmp 로 세 개의 이미지가 저장된다.
Tool : Matlab Library & Utilized : - Reference : {Paul Viola & Michael Jone}'s Paper etc. : -
This source is made for AdaBoost algorithm understanding easy, when I prepared master's thesis.
First picture is the window for inputting data. If you click left button, positive(+1) data is inputted and right button is for inputting negative(-1) data.
After inputting all data, enter the any then boosting start.
Second image is the result of learning. All data(in this case, position is data) is determined as positive(+1) or negative(-1).
AdaBoost 작동 원리를 심플하게 파악할수 있는 매트랩 소스
AdaBoostMatlab 매트랩 파일을 열어서 - f5키 실행
Figure 새창이 떳을때 왼쪽 클릭(+1 클래스), 오른쪽 클릭 (-1 클래스)으로
평면에 학습 데이터 샘플을 지정해준다. 많이 해도 상관없음
학습데이터 샘플을 원하는 만큼 만든 다음 엔터키를 누르면 부스팅 시작
학습이 끝난다음 평면에서 모든 좌표에 대하여 +1 클래스인지 -1 클래스인지를 판단하여 색으로 표현한다. 이것이 학습에 대한 검출 끝.
AdaBoostMatlab.m 말고 다른 파일들은 그냥 만들면서 테스트한 파일들인데 참고하시고 아다부스트에 필요하지는 않습니다.
Tool : Microsoft Visual C++ 6.0 (MFC) Library & Utilized : - Reference : Simplified approach to image prcessing book -Randy Crane- etc. : Bmp Image Files
Many ages ago, when I studied image processing firstly, I made this program for training programming skill and studying image processing.
This program include variety image processing functions.
For example
Filter function - blur,highpass, median, embossing, edge gaussian noise, morphology, the window that support preview function and the value of mask.
Geometry function - flip, rotation, zoom in/out
Channel split - RGB, HSI, CMYK, YIQ, YUW, YUV, YCbCr, the window that support preview function.
Color adjustment - Contrast, Brightness, HSI, Gamma, Red-Green tint, Reference, colorfulness
Histogram - binary, logarithm, auto contrast strech, end in contrast stretch.
etc - undo,redo function, skin color detection, labeling
처음 영상처리 공부를 시작했을 때 프로그래밍과 이미지 처리 방법을 공부하기 위해 만든 프로그램 입니다.
이 프로그램은 bmp 파일포맷을 자유롭게 다룰수 있는 클래스를 제작하여 다음과 같은 여러가지 이미지 처리 기능을 구현했습니다.
필터기능 - blur,highpass, median, embossing, edge gaussian noise, morphology.
필터결과와 마스크값을 미리보기 기능창.
이미지조작 - 플립, 반전, 회전, 확대, 축소
체널 분리 - RGB, HSI, CMYK, YIQ, YUW, YUV, YCbCr, 분리된 채널을 한눈으로 볼수있는 기능창.
색조절 - Contrast, Brightness, HSI, Gamma, Red-Green tint, Reference, colorfulness.
히스토그램 - 이진화, logarithm, auto contrast strech,end in contrast stretch.
기타 - undo,redo기능 살색추출, 라벨링.
이웃된 두 장의 영상을 입력 받아 하나의 모자이크 영상(파라노마)으로 만든다.
특징 추출 및 비교 방법 : suft ->cvExtractSURF
특징 매칭 방법 : FindMatchingPoints
호모그라피 행렬 구하기 : cvFindHomography
영상 모자이크 방법 : warpping