Embeded camera R&D for Real-Time fire detection surveillance in tunnel environment
- 2008.07.01~2009.06.30
- High Computing Power Embeded Camera R&D, Fire & Smoke Detection(My Job)
The goal of the project is to develop embeded camera for detect fire and smoke.
My job was an algorithm R&D for detection fire & smoke and the s/w programing.
The fire detection algorithm uses the HMM algorithm.
The features of the fire's sequence is learned in the off-line. And then the learned Markov model is used in the oline using viterbi algorithm.
Below Movies are the result of the project.
*** Demo 1, Fire detection Simple situation :
*** Demo 2, Fire detection in the road, There is similar light of the car with fire color:
***Demo 3, Fire detection test in the real fire situation :
***Demo 4, Embeded Camera Test. The camera detects the fire and then zoom in the region of the fire.
This code is 8 point algorithm.
If we know over 8 corresponding points between two images, we can know Rotation and Translation of camera movement using 8 point algorithm.
The 8 point algorithm is well known in the vision major field.
The algorihtm is introduced at the Multiple View Geometry Book and many websites.
Have you ever listened Fundamental matrix song? The song is very cheerful. ^^
You can download 8 point algorithm at the Peter Covesi homepage.
My code is very simple. so I believe my code will be useful to you.
I will upload RANSAC version later.
Thank you.
There are many expression to show the rotation value.
(Ex. : Euler, Matrix, Quaternion.. )
This code is the test source to convert each other.
Euler -> Matrix -> Quanternion -> Matrix -> Euler
We can show the first Euler value is same with the last Euler value.
The source code is like below:
--------------------------------------------------------------
% Rotation vector of x,y,z axis.
Rv = [13 20 50];
% 3x3 matrix of R vector (Results of the Rm1 and Rm2 is similar.)
Rm1 = rodrigues(Rv*pi/180)
Rm2 = mRotMat(Rv)
% Quntenion vector of R matrix
Rq1 = matrix2quaternion(Rm1)
Rq2 = matrix2quaternion(Rm2)
% R matrix of Q vector
Rm1_1 = quaternion2matrix(Rq1)
Rm2_2 = quaternion2matrix(Rq1)
% R vector of R matrix
Rv_1 = rodrigues(Rm1_1(1:3,1:3)) * 180/pi
Rv_2 = rodrigues(Rm2_2(1:3,1:3)) * 180/pi
Tool : Microsoft Visual C++ 6.0 Library & Utilized : STL Reference : A* internet reference etc. : map(.txt file)
It is A* algorithm. A* is known as good path plan algorithm in the Game and other fields.
I made the A* algorithm program. I have refered a lot of reference in the internet. You also can get materials easily in the internet.
I made the algorithm to class type. So we can use the A* Class like this;
map variable type is 'int ** map'.
sX, Sy is start coordinate. eX, ey is end coordinate.
The path coordinate is saved in the path variable(vector type).
You can download this <source code>.
And I wish to leave your valueable comment.
Tool : Microsoft Visual C++ 2008 Library & Utilized : OpenCV 2.3 Reference : SIFT reference etc. : template Image, WebCam
I made SIFT matching program using OpenCV 2.3.
I was wondering how to know the object pose.
In the internet, there are many source about sift, surf. But most of code introduced about only descripter and matching. There is no code to find object pose.
So I made this code and I should disclose this code.
This code uses openCV functions very useful.
cvExtractSURF, cvFindHomography...
I made matching code to the class. Class file name is MareMatchingClass.h/cpp.
You can use my class in the source very easily.
1. Create Matching class
CMareMatchingClass MMathing;
3.Find PatchImg in the background img
MMathing.GetObjectRectAndBestH(BackGroundImg, &rect4pt);
4.Drawing the rect(rect4pt).
5.Repeat, go to the 3.
The class is consist of like below process;
1. Extract Feature -> use cvExtractSURF function
2. Find Matching point
3. Select some feature in the mached feature points, randomly.
4. calculate Homography matrix. This is geometry relationship between patch and background image.
5. transform features in the patch image by Homography matrix.
6. compare the transformed features to the background features.
7. evaluate how much is the homography exact.
7. repeat 4~6 and select best H.
I think the source code is not best.
There are still shortage the source code.
It would need futher improvemnet.
so I want to discuss with you. Please leave your valueable opinion.
Thank you.
Have a nice day~. ^^
I made Incremental K-means algorithm as matlab source code.
I made the code base on above table which is introduced in the paper.
The incremental K-means is similar to K-means but the different point is number of cluster class is increasing. but we have to set the maximum number.
Below figure is result of clustering. the sample data is normal vector of the 3D point that is acquied by bumblebee.
I think the K-means algorithm is sensitive to error or outlier data. because the algorithm use euclidean distance. and The result of clustering is different every time because the initial position of the class is selected randomly.
I hope my code help to your problem and study.
thank you.
Give me your valuable comments. ^^
BumBleBee Stereo Camera Data Acquisition Source code.
This is Stereo Camera. The name is BumBleBee. This is product of PointGrey Company.
This camera is IEEE 1394 capble type.
This camera can obtain 3D cloud data rapidly and continously.
I need 2 library for using this camera(Triclops SDK, FlyCapture).
You can download these libs on the www.ptgrey.com site(support).
You have to use my source after install libs. and you have to set path(To include directory, lib directory). and you also need opencv 2.1 lib.
I made the acquisition code as class. The class name is CSensorStereo2.
You can use this class like below source code.
The sequence is 'Open->GetData->Close'.
I did that 2D data save Iplimage in opencv and 3D depth data save as Txt file.
The source code is very easy to use ^^.
If you have any question, Plz give your comments to me.
--------------------------------------------------------------------
이 소스 코드는 Catmull-Rom 보간법을 프로그래밍 한 것 입니다.
이론적인 내용은 인터넷을 검색하시면 많은 자료를 찾을 수 있어서 생략합니다.
메인 함수에는 입력, 보간, 출력으로 구성되어 있고, 입력을 원하는 좌표 값을 입력하여 해당 문제에 적용하시면될 거예요.
보간 함수는 좌표, 스텝,한 구간 보간 갯수를 입력하도록 하였습니다.
매트랩을 통하여 보간결과를 확인해보세요.
간단한 매트랩 파일도 첨부합니다.
This program is for detecting 4 corners of rects(3 rect).
The detection process is shown below.
1. Candidate corner detection using cvGoodFeaturesToTrack function.
2. Blob Coloring - Find 3 biggest blobs
3. Angle inspection tracking outline of blob. - using cvConvexHull2 function.
Corner's angle would be big than other angles. so we select 4 corners.
cvGoodFeaturesToTrack로 코너 검출 CBlobResult로 Blob Coloring하여 가장 큰 덩어리 3개를 찾음 (사각형 3개) 각 Blob에 대해 cvConvexHull2로 외곽 점 검출 외곽점을 따라가면서 점 간에 각을 저장 점 간의 각도 중 가장 각이 큰 4점을 선택하여 모서리로 판단함 판단된 4점에서 코너점과 가장 가까운 4점을 선택함 이렇게 한 사각형에 대한 모서리 점이 선택됨
결과는 세개의 사각형에 대한 Left Top, Right Top, Right Bottom, Left Bottom 의 이미지 좌표를 알려줌 따라서 카메라 캘리브레이션을 위한 월드 좌표 - 이미지 좌표 값을 자동으로 추출 가능함
In 2010, I entered 10th unmanned vehicle contest.
The competition was sponsored by by Hyundai-Kia Motors.
In the our team, my part was software.
I had to solve many problems.
For example; Obstacle Detection and avoidance, mapping, path planing, Localization...
During prepare the competition, I programed nearly 30,000 lines. ^^
My team didn't acomplish the win. But our vehicle have finished all course as unmanned.
And I did my best. so I do not regret it.
OBS have broadcasted this competition.
This movie captured while unmaned vehicle driving.