550 images of side view car
I don't remember how to get this images exactly.
I can not sure I made or get other site..
But this image will be useful to someone, so I share this images.
< down >
1/13/2013
1/12/2013
CvFilter2D example source code, various Filter masks
double K[] = { 1, 2, 1, 2, 4, 2, 1, 2, 1 }; float t=0; for(int i=0; i< (3*3); ++i) t = t + K[i]; for(int i=0; i< (3*3); ++i) K[i] = K[i] / t; CvMat Kernel=cvMat(3, 3, CV_64FC1, K); cvFilter2D(InputImg,OutputImg, &Kernel);various type of filter mask
Gaussian Filter
Average Filter
High pass Filter
Horizontal Prewitt Filter
Vertical Prewitt Filter
Horizontal Sobel Filter
Vertical Sobel Filter
Laplacian Filter
Sharpen Filter
Sharpen Low Filter
1/10/2013
C file Write, Read by Binary - example source code
C file Write, Read by Binary - example source code
#include < stdio.h > #include < stdlib.h > #include < time.h > void main() { ////////////////////////////////////////////////////////////////////////// //File Write by binary srand( time(0)); float feature[10]; for(int i=0; i<10; ++i) feature[i] = rand()/100; //data confirm for(int i=0; i< 10; ++i) printf("%lf\n", feature[i] ); FILE * fp; fp = fopen("output.txt", "wb"); fwrite(feature, sizeof(float), 10, fp); fclose(fp); printf("//////////////////////////////////////////////////////////////////////////\n"); ////////////////////////////////////////////////////////////////////////// //File Read by binary float feature_r[10]; FILE* fp2; fp2 = fopen("output.txt", "rb"); fread(feature_r, sizeof(float), 10, fp2); fclose(fp2); //data confirm for(int i=0; i< 10; ++i) printf("%lf\n", feature_r[i] ); ////////////////////////////////////////////////////////////////////////// }
881A sonar sensor - data acquisition source code
881A sonar sensor - data acquisition source code
< source code >
This code is also made by VS 2008.
This source code included 'interface_881A' class.
You can get the data easily using the class.
Thank you.
< source code >
This code is also made by VS 2008.
This source code included 'interface_881A' class.
You can get the data easily using the class.
//port open CString strPort = "COM5"; int baudrate = 115200; int data = 8; int parity = 0; int stop = 0;//1; C881A.OpenPort2(strPort,baudrate,data,parity,stop); //request data C881A.SendData(); //data acquisition part //The data is saved in the Command_881A_GetData struct CString str; str.Format("%s", C881A.ReceiveData.DataHeader.c_str()); m_List.AddString(str); str.Format("Head ID : %d", C881A.ReceiveData.HeadID); m_List.AddString(str); str.Format("Head Position : %lf", C881A.ReceiveData.HeadPosition); m_List.AddString(str); str.Format("Head direction : %d", C881A.ReceiveData.Direction); m_List.AddString(str); str.Format("Range : %d", C881A.ReceiveData.Range); m_List.AddString(str); str.Format("Profile Range : %d", C881A.ReceiveData.ProfileRange); m_List.AddString(str); str.Format("Data Byte : %d", C881A.ReceiveData.DataBytes); m_List.AddString(str); m_List10.ResetContent(); for(int i=0; i< 500; ++i) { str.Format("[%d] = %d", i, C881A.ReceiveData.Data[i]); m_List10.AddString(str); } /////////////////////////// //close port C881A.ClosePort();
Thank you.
3DM-GX3 IMU sensor - Data acquisition source code
3DM-GX3 IMU sensor - Data acquisition source code
"How to change 4byte bit data to float" is used to get the roll, yaw, pitch.
The method is introduced on my blog here.
this code is useful to you.
Thank you.
Code is made by Visual studio 2008(C++).
< Source code >
There is "3DM_GX3_interface" class In the source code.
You can get IMU data easily using the class.
//Open Port CString strPort = "COM7"; int baudrate = 115200; //19200; int data = 8; int parity = 0; int stop = 0;//1; C3DM_GX3.OpenPort2(strPort,baudrate,data,parity,stop); //Request Data to the IMU, This function need one time when start to acquisition. C3DM_GX3.SendData() //Get Data loop until end. C3DM_GX3.ReceiveData.roll/3.14*180 ; C3DM_GX3.ReceiveData.pitch/3.14*180 ; C3DM_GX3.ReceiveData.yaw/3.14*180 ; //Close Port C3DM_GX3.ClosePort();
"How to change 4byte bit data to float" is used to get the roll, yaw, pitch.
The method is introduced on my blog here.
this code is useful to you.
Thank you.
1/02/2013
Matlab dimension change function -> reshape
Useful function ~ ^^
A = magic(3)
A =
8 1 6
3 5 7
4 9 2
>> B = reshape(A, 1, 3*3)
B =
8 3 4 1 5 9 6 7 2
A = magic(3)
A =
8 1 6
3 5 7
4 9 2
>> B = reshape(A, 1, 3*3)
B =
8 3 4 1 5 9 6 7 2
Image Normalization using Standard deviation - example source code
You can understand Standard deviation normalization, referenced on this web page.
http://www.d.umn.edu/~deoka001/Normalization.html
This web page introduce that..(wrote by Siddharth Deokar)
-------------------------------------------------------------------------
Normalization by Standard Deviation
We normalize the attribute values by using standard deviation.
For Example:
Consider 5 instances which has attribute A with the follwing values: {-5, 6, 9, 2, 4}
First we calculate the mean as follows:
Mean = (-5+6+9+2+4) / 5 = 3.2
Second, we subtract the mean from all the values and square them:
(-5-3.2)^2 = 67.24
(6-3.2)^2 = 7.84
(9-3.2)^2 = 33.64
(2-3.2)^2 = 1.44
(4-3.2)^2 = 0.64
Then we find the deviation as follows:
Deviation = sqrt ((67.24 + 7.84 + 33.64 + 1.44 + 0.64) / 5) = 4.71
Now we normalize the attribute values:
x => (x - Mean) / Deviation
-5 => (-5 - 3.2) / 4.71 = -1.74
6 => (6 - 3.2) / 4.71 = 0.59
9 => (9 - 3.2) / 4.71 = 1.23
2 => (2 - 3.2) / 4.71 = -0.25
4 => (4 - 3.2) / 4.71 = 0.17
-------------------------------------------------------------------------
This is sample source code:
http://www.d.umn.edu/~deoka001/Normalization.html
This web page introduce that..(wrote by Siddharth Deokar)
-------------------------------------------------------------------------
Normalization by Standard Deviation
We normalize the attribute values by using standard deviation.
For Example:
Consider 5 instances which has attribute A with the follwing values: {-5, 6, 9, 2, 4}
First we calculate the mean as follows:
Mean = (-5+6+9+2+4) / 5 = 3.2
Second, we subtract the mean from all the values and square them:
(-5-3.2)^2 = 67.24
(6-3.2)^2 = 7.84
(9-3.2)^2 = 33.64
(2-3.2)^2 = 1.44
(4-3.2)^2 = 0.64
Then we find the deviation as follows:
Deviation = sqrt ((67.24 + 7.84 + 33.64 + 1.44 + 0.64) / 5) = 4.71
Now we normalize the attribute values:
x => (x - Mean) / Deviation
-5 => (-5 - 3.2) / 4.71 = -1.74
6 => (6 - 3.2) / 4.71 = 0.59
9 => (9 - 3.2) / 4.71 = 1.23
2 => (2 - 3.2) / 4.71 = -0.25
4 => (4 - 3.2) / 4.71 = 0.17
-------------------------------------------------------------------------
This is sample source code:
// int i,j,z; double sum=0; double Mean; //sum, mean for(j=0; j< Height; ++j) { for(i=0; i< Width; ++i) { sum = sum + Pdata[i][j]; } } Mean = sum/(Height*Width); //Deviation double dSum=0; double deviation; double std_dev; for(j=0; j< Height; ++j) { for(i=0; i< Width; ++i) { Pdata[i][j] = (Pdata[i][j] - Mean); dSum = dSum + (Pdata[i][j]*Pdata[i][j]); } } deviation = dSum / (Width*Height); std_dev = sqrt(deviation); //Normalization for(j=0; j< Height; ++j) { for(i=0; i< Width; ++i) { Pdata[i][j] = (Pdata[i][j] / std_dev); } }
Subscribe to:
Posts (Atom)
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
Created Date : 2011.2 Language : C/C++ Tool : Microsoft Visual C++ 2010 Library & Utilized : OpenCV 2.2 Reference : Interent Refer...
-
Background subtractor example souce code. OpenCV support about 3 types subtraction algorithm. Those are MOG, MOG2, GMG algorithms. Det...
-
This post is about how to copy Mat data to vector and copy vector data to Mat. Reference this example source code. printf ( "/////...
-
Image size of origin is 320*240. Processing time is 30.96 second took. The result of stitching The resul...
-
EMD(earth mover distance) method is very good method to compare image similarity. But processing time is slow. For using the EMD compare, ...
-
This example source code is to extract HOG feature from images. And save descriptors to XML file. The source code explain how to use HOGD...
-
Logistic Classifier The logistic classifier is similar to equation of the plane. W is weight vector, X is input vector and y is output...
-
I use MOG2 algorithm to background subtraction. The process is resize to small for more fast processing to blur for avoid noise affectio...
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...