Below code is example of matlab help document.
x = -pi:pi/10:pi;
y = tan(sin(x)) - sin(tan(x));
plot(x,y,'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',10)
You can describe axes on your image.
data2 = imread('map.tif');
figure(1);
iptsetpref('ImshowAxesVisible','on');
imshow(data2); %'colormap',bone(0)
set(gca, 'XTickLabel', {'a', 'b', 'c', 'd', 'e', 'f'} );
set(gca, 'YTickLabel', {100:100:700} );
xlabel('Longitude');ylabel('Latitude');
It is simple and easy but I can not remember the code well when I need this code.
So I leave this code in my blog.
And I hope the code is also useful to all visitor.
Thank you.
endIndex = 10;
for j=1:endIndex
Index = num2str(j);
dataD = strcat(Index,'saveFile.txt')
data = load(dataD);
end
->
This source code can load below file names sequentially.
1saveFile.txt
2saveFile.txt
3saveFile.txt
4saveFile.txt
5saveFile.txt
6saveFile.txt
7saveFile.txt
...
Tool : Visual Studio 2008 Library & Utilized : CImage Reference : Internet etc. : -
I made this program to help my friend.
This progrma is screen capture program.
At first, we do whole screen capture and set region of screen to capture.
Then start capture and image saving in real-time.
The image file is saved in your program directory.
The file name of the saved image is like that "Time.jpg(EX: 11223242.jpg, 11223243.jpg...)"
The program is made based on below capture program.
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.