9/29/2011

The Method to make DLL and using / C++ / Class DLL ๋งŒ๋“ค๊ธฐ

Created Date : 2011.08.
Language : C++ /MFC
Tool : Visual Studio C++ 2008
Library & Utilized : -
Reference : -
Etc. : -



*Make DLL
1. create project



2. create basic class
 3. Add functions


Now, we will  process theses functions in the new class.
Because we donn't want to exposure source code of function.
So we made interface class for dll distribution.

4. Create Class #1
This is class for basic calculation. (+,-,/,*)

5. Create Class #2
This is class for squre, sqrt calculation.


6. Use Class #1, Class #2 in the Dll interface class.

7. Compile and Use dll, lib, h at other program.



*Use DLL
1. Make project


2. Copy lib, dll, h into new project folder.

3. Write dll file name into Additional library

4. Now, let's program using dll


Source code <here>

In the source code, Making DLL and Using DLL projects are included.
And also there is a document but it is written by korean but it is same content with I posted.
Thank you.

Plz give me your valuable opnion.
And I want to your comment about my broken english.











9/27/2011

Copy Constructors, Assignment Operators, Example C++ / ๋ณต์‚ฌ ์ƒ์„ฑ์ž, ๋Œ€์ž… ์—ฐ์‚ฐ์ž ์˜ˆ์ œ ์†Œ์Šค

There are A, B and C classes.
C is including A,B classes. and B is including A class.
When copy from C2 to C1, How to make "Copy Constructors, Assignment Operators"?

C c1;
C c2(xx,yy);
c1 = c2;
Below source code is example of these case.

----------------------------------------------------------------------------------------------
#include <vector>
using namespace std;

struct coordi{
 int x;
 int y;
};

class A{
public:
 A():val1(0),val2(0){}
 A(int inV1){
  val1 = inV1;
 }
 A(int inV1, vector<coordi> inV2){
  val1 = inV1;
  val2 = inV2;
 }
 A(const A &in)
 {
  val1 = in.val1;
  val2 = in.val2;
 }
 bool operator = (const A &inA )
 {
  val1 = inA.val1;
  val2 = inA.val2;
  return 0;
 }

 void printfAll()
 {
  printf("class A\n");
  printf("val1 = %d\n", val1);
  for(int i=0; i<val2.size(); ++i)
  {
   printf("val2[%d] - x = %d, y=%d\n", i, val2[i].x, val2[i].y );
  }
  printf("\n");
 }

private:
 int val1;
 vector<coordi> val2;
};

class B{
public:
 //////////////////////////////////////////////////////////////////////////
 B():val1(0),val2(0),class1(){}
 B(int inV1){
  val1 = inV1;
 }
 B(int inV1, vector<coordi> inV2 ){
  val1 = inV1;
  val2 = inV2;
 }
 B(int inV1, vector<coordi> inV2, A inV3 ){
  val1 = inV1;
  val2 = inV2;
  class1 = inV3;
 }
 //////////////////////////////////////////////////////////////////////////
 B(const B &in)
 {
  val1 = in.val1;
  val2 = in.val2;
  class1 = in.class1;
 }
 bool operator = (const B &inB )
 {
  val1 = inB.val1;
  val2 = inB.val2;
  class1 = inB.class1;

  return 0;
 }
 //////////////////////////////////////////////////////////////////////////
 void printfAll()
 {
  printf("class B \n");
  printf("val1 = %d\n", val1);
  for(int i=0; i<val2.size(); ++i)
  {
   printf("val2[%d] - x = %d, y=%d\n", i, val2[i].x, val2[i].y );
  }
  printf("\n");
  class1.printfAll();
 }

private:
 A class1;
 int val1;
 vector<coordi> val2;
};


class C{
public:
 //////////////////////////////////////////////////////////////////////////
 C():val1(0),val2(0),class1(),class2(){}
 C(int inV1){
  val1 = inV1;
 }
 C(int inV1, vector<coordi> inV2 ){
  val1 = inV1;
  val2 = inV2;
 }
 C(int inV1, vector<coordi> inV2, A inV3 ){
  val1 = inV1;
  val2 = inV2;
  class1 = inV3;
 }
 C(int inV1, vector<coordi> inV2, A inV3 , B inV4){
  val1 = inV1;
  val2 = inV2;
  class1 = inV3;
  class2 = inV4;
 }
 //////////////////////////////////////////////////////////////////////////
 C(const C &in)
 {
  val1 = in.val1;
  val2 = in.val2;
  class1 = in.class1;
  class2 = in.class2;
 }
 bool operator = (const C &inC )
 {
  val1 = inC.val1;
  val2 = inC.val2;
  class1 = inC.class1;
  class2 = inC.class2;
  return 0;
 }
 //////////////////////////////////////////////////////////////////////////
 void printfAll()
 {
  printf("class C \n");
  printf("val1 = %d\n", val1);
  for(int i=0; i<val2.size(); ++i)
  {
   printf("val2[%d] - x = %d, y=%d\n", i, val2[i].x, val2[i].y );
  }
  printf("\n");
  printf("class 1\n");
  class1.printfAll();
  printf("class 2\n");
  class2.printfAll();
 }

private:
 A class1;
 B class2;
 int val1;
 vector<coordi> val2;
};

int _tmain(int argc, _TCHAR* argv[])
{
 //////////////////////////////////////////////////////////////////////////
 int sampleV1 = 100;
 vector< coordi > sampleV2;
 for(int i=0; i< 10; ++i)
 {
  coordi tCoordi;
  tCoordi.x = i;
  tCoordi.y = i*i;
  sampleV2.push_back(tCoordi);
 }
 //////////////////////////////////////////////////////////////////////////
 A cA1;
 cA1.printfAll();

 A cA2(sampleV1);
 cA2.printfAll();

 A cA3(sampleV1, sampleV2);
 cA3.printfAll();
 printf("===============\n");
 //////////////////////////////////////////////////////////////////////////

 B cB1;
 cB1.printfAll();

 B cB2(sampleV1, sampleV2);
 cB2.printfAll();

 B cB3(sampleV1,sampleV2,cA3);
 cB3.printfAll();

 B cB4(cB3);
 cB4.printfAll();

 B cB5;
 cB5 = cB4;
 cB5.printfAll();
    //////////////////////////////////////////////////////////////////////////

 C cC1;
 cC1.printfAll();

 C cC2(sampleV1);
 cC2.printfAll();

 C cC3(sampleV1, sampleV2);
 cC3.printfAll();

 C cC4(sampleV1, sampleV2,cA3);
 cC4.printfAll();

 C cC5(sampleV1, sampleV2,cA3,cB3);
 cC5.printfAll();

 C cC6(cC5);
 cC6.printfAll();

 C cC7;
 cC7 = cC5;
 cC7.printfAll();

 return 0;
}

You can download source code <here>.

9/11/2011

When the sparse bundle adjustment(v1.6) make c++ project source using CMake (v2.8.4), Do you know Why warning message occur?

Firstly, I downloaded SBA(Sparse Bundle Adjustment v1.6) from <here>.
And I prepared CLAPACK Lib from <here>.
And My CMake version is 2.8.4.

Step 1. Directory setting


Step 2. Configuration, Fininsh(in ppoup window, after generator selecting(in my case - vs 2008)


Step 3. After Step2. I modify wrong property in the list(red color)



Step 4. Re-Configure


Step 5. Some Warning is appeared. but I do the Generation progress.


Step 6. In my target directory, project files is generated by cmake. but I can not be sure whether It made well or not?


Who can help me? Why did these warning message appear? How do I do to correct warning message? Plz give me your thought. Thank you!!

9/10/2011

TCP/IP Chatting Program using CAsyncSocket / C++, MFC / TCP/IP๋ฅผ ์ด์šฉํ•œ ๊ฐ„๋‹จํ•œ ์ฑ„ํŒ… ํ”„๋กœ๊ทธ๋žจ


Created Date : 2011.05.27
Language : C++ /MFC
Tool : Visual Studio C++ 2010
Library & Utilized : CAsyncSocket class
Reference : -
Etc. : -



This source is simple chatting program using CAsyncSocket class in MFC.
The source is useful for someone who want to make chatting program simple and quickly.


--------------------------------------------------------------------
CAsyncSocket ํด๋ž˜์Šค๋ฅผ ์ด์šฉํ•œ ๊ฐ„๋‹จํ•œ ์ฑ„ํŒ… ํ”„๋กœ๊ทธ๋žจ์ž…๋‹ˆ๋‹ค.
์ฒ˜์Œ ์ฑ„ํŒ… ํ”„๋กœ๊ทธ๋žจ์„ ์‹œ์ž‘ํ•˜๊ฑฐ๋‚˜ ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ฐ์ดํ„ฐ ์ „์†ก์„ ํ•˜๊ณ  ์‹ถ์€ ๋ถ„์€, ์ด ์†Œ์Šค๋ฅผ ์ด์šฉํ•ด์„œ ์‰ฝ๊ฒŒ ์ ‘๊ทผ ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™๋„ค์š”.


How to calculate R,T between C1 and C2? / matlab source / ๋‘ ๋Œ€์˜ ์นด๋ฉ”๋ผ Rotation, Translation์€ ์–ด๋–ป๊ฒŒ ๊ณ„์‚ฐํ• ๊นŒ?


 Created Date : 2011.8
Language : matlab
Tool : matlab
Library & Utilized : rodrigues function (Jean-Yves Bouguet)
Reference : -
Etc. : -



There are two camera. These camera is arranged as reference of O.
Rotation and Translation of C1 is 

R1 =  -0.009064 0.985541 -0.169195
       0.969714 -0.032636 -0.242051
      -0.244074 -0.166265 -0.955397

T1 = 4.684369
    -7.384014
    29.614508

And Rotation and Translation of C2 is

R2 =  0.078149 0.984739 -0.155505
      0.971378 -0.040117 0.234128
      0.224317 -0.169351 -0.959688

T2 = -10.151448
     -7.261157
      29.69228


So, What is R, T between C1, C2?

wR = R2*inv(R1);
wT = T2-T1;

This matlab code show this process.
We get wR, wT. And C1 is rotated and Translated by wR, wT. Then, the axis of C1 is laid on C2 exactly. 


<source code>

--------------------------------------------------------------------------
๋‘ ๊ฐœ์˜ ์นด๋ฉ”๋ผ๊ฐ€ ์›์ ์„ ๊ธฐ์ค€์œผ๋กœ ์žˆ๋‹ค.
C1 ์นด๋ฉ”๋ผ์˜ R,T๊ฐ€ ์žˆ๊ณ  C2์นด๋ฉ”๋ผ์˜ R,T๊ฐ€ ์›์ ์„ ๊ธฐ์ค€์œผ๋กœ ์žˆ์„๋•Œ, C1๊ณผ C2 ์‚ฌ์ด์˜ R, T๋Š” ์–ด๋–ป๊ฒŒ ๋ ๊นŒ? ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๊ฐ„๋‹จํ•˜๊ฒŒ ๊ณ„์‚ฐ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.


wR = R2*inv(R1);
wT = T2-T1;


์ด ๋งคํŠธ๋žฉ ์†Œ์Šค ์ฝ”๋“œ๋Š” C1, C2 ์‚ฌ์ด์˜ R,T๋ฅผ ๊ตฌํ•˜๊ณ  ๊ทธ R,T๋ฅผ ์ด์šฉํ•ด์„œ C1์„ C2๋กœ ์ •ํ™•ํžˆ ์˜ฎ๊ฒจ์ง์„ ํ™•์ธํ•˜๋Š” ์†Œ์Šค์ž…๋‹ˆ๋‹ค.

<source code>

9/07/2011

Multi View Face Detection / C++, OpenCV / ๋‹ค์ค‘๋ทฐ ์–ผ๊ตด ๊ฒ€์ถœ


Created Date : 2008.1
Language : C++
Tool : Visual C++ 6.0
Library & Utilized : OpenCV 1.0
Reference : AdaBoost Algorithm, Learning OpenCV Book
Etc. : webcam





This source code is Multi-View Face detection.
The program detects variable view of face those are front, 45, 90 and rotated.
There are learned xml files that is made by AdaBoost Algorithm.
Each xml files are the result of learning of front, 45, 90.
Simultaneously, All detectors are running.

I lost this code in the old days. So uploaded source code may be not run well. because it is not last version source code. But It will be useful because the code include same concept.

<source code>


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์˜ AdaBoostํ•™์Šต๊ณผ ๊ฒ€์ถœ์„ ์ด์šฉํ•˜์—ฌ ์ •๋ฉด, 45๋„, 90๋„ ์–ผ๊ตด ๊ทธ๋ฆฌ๊ณ  ํšŒ์ „๋œ ์–ผ๊ตด์„ ๊ฒ€์ถœํ•ฉ๋‹ˆ๋‹ค.๊ฐ๊ฐ์˜ ๋ทฐ์— ๋Œ€ํ•˜์—ฌ AdaBoost ์•Œ๊ณ ๋ฆฌ์ฆ˜์œผ๋กœ ํ•™์Šตํ•˜์—ฌ ๊ฒ€์ถœํ•˜์˜€์Šต๋‹ˆ๋‹ค.
ํšŒ์ „๋œ ์–ผ๊ตด์€ ์ •๋ฉด ๋ถ„๋ฅ˜๊ธฐ๋ฅผ ์ด์šฉํ•˜๋˜ ์˜์ƒ์„ ํšŒ์ „์‹œ์ผœ ์ ์šฉํ•˜๋„๋ก ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
๋„์›€ ๋˜์‹œ๊ธธ ๋ฐ”๋ผ๋ฉฐ, ์ข‹์€ ์˜๊ฒฌ ๋ฐ”๋ž๋‹ˆ๋‹ค.


์˜ˆ์ „์— ์ด ์†Œ์Šค๋ฅผ ์žƒ์–ด ๋ฒ„๋ ค ๋™์˜์ƒ๊ณผ ๊ฐ™์€ ๋™์ž‘์ด ์•ˆ๋  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.
์ด ์†Œ์Šค๊ฐ€ ์ตœ์ข… ์†Œ์Šค๊ฐ€ ์•„๋‹ˆ๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.


With Lim Sung-Jo.



SUDOKU source code / C,C++ /์Šค๋„์ฟ  ์†Œ์Šค ์ฝ”๋“œ


Created Date : 2011.4
Language : C/C++
Tool : MS Visual Studio 
Library & Utilized : -
Reference : SUDOKU rule
etc : -

This source code makes SUDOKU number randomly.
When I taught c/c++ to junior students, I gave homework SUDOKU for understanding programming logic. But nobody solve this logic.
I tried to solve the problem. According to my experience, this logic is not easy. ^^

์Šคํ† ์ฟ  ์ˆซ์ž๋ฅผ ๋žœ๋ค์œผ๋กœ ์ƒ์„ฑ ์‹œํ‚ค๋Š” ์†Œ์Šค ์ฝ”๋“œ์ž…๋‹ˆ๋‹ค.
์ข‹์€ ์˜๊ฒฌ ๋‚จ๊ฒจ์ฃผ์„ธ์š”.
๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.




9/06/2011

Conduct an investigation about length of snake. And write sequence number on it's body.

A huge snake has appeared in our village.
If we cannot kill the snake, it is clear that village is damaged by snake.
Many people are under investigation to kill the snake.
We also receive the mission that we write sequence number on it's body.
The number is written as sequence from 1.
Let's solve the problem hurry and save the our village


-Input is txt file.
The name is "input.txt"
Input file consist of like below.
.size of width, size of height
.map information

-output
You should save as "output.txt".
The file include sequence number about snake.

--------------------------------------------------------

์–ด๋–ค ๋งˆ์„์— ๊ฑฐ๋Œ€ํ•œ ๋ฑ€์ด ๋‚˜ํƒ€๋‚ฌ๋‹ค.
๋นจ๋ฆฌ ๋ฑ€์„ ์ฃฝ์ด์ง€ ์•Š์œผ๋ฉด ๋งˆ์„์— ํฐ ํ”ผํ•ด๊ฐ€ ์˜จ๋‹ค.
์‚ฌ๋žŒ๋“ค์€ ์ด ๋ฑ€์„ ์žก๊ธฐ ์œ„ํ•œ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ฐฉ๋ฒ•์„ ์กฐ์‚ฌ ์ค‘์ด๋‹ค.
์šฐ๋ฆฌ๋Š” ๋งˆ์„๋กœ ๋ถ€ํ„ฐ ๋ฑ€ ๋ชธ์˜ ๋งˆ๋””๋งˆ๋‹ค ์ˆซ์ž๋ฅผ ์“ฐ๋ผ๋Š” ์ž„๋ฌด๋ฅผ ๋ฐ›์•˜๋‹ค.
์ˆซ์ž๋Š” 1์„ ์‹œ์ž‘์œผ๋กœ ์ˆœ์ฐจ์ ์œผ๋กœ ๊ธฐ๋กํ•ด์•ผ ํ•œ๋‹ค.
์ž~ ๋นจ๋ฆฌ ๋ฑ€์˜ ๋งˆ๋””์— ์ˆซ์ž๋ฅผ ์“ฐ๊ณ  ๋งˆ์„์„ ๊ตฌํ•˜์ž~!

์ž…๋ ฅ
๋งˆ์„ ๊ฐ€๋กœํฌ๊ธฐ, ๋งˆ์„ ์„ธ๋กœํฌ๊ธฐ
๋งˆ์„๊ณผ ๋ฑ€์„ ๋‚˜ํƒ€๋‚ด๋Š” ๊ฒฉ์ž

์ถœ๋ ฅ
๋ฑ€์˜ ๋งˆ๋””์— ์ˆœ์ฐจ์ ์€ ์ˆซ์ž๋กœ ๋Œ€์ฒด

ex1)
- input.txt -
5 5
0 0 0 0 0
0 1 1 1 0
0 0 0 1 0
0 1 1 1 0
0 0 0 0 0

-output.txt-
0 0 0 0 0
0 1 2 3 0
0 0 0 4 0
0 7 6 5 0
0 0 0 0 0


ex2)
-input.txt-
10 10
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0
0 0 0 1 1 0 0 0 0 0
0 0 0 0 1 1 1 1 0 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0

-output.txt-
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 1 2 0 0 0 0 0 0 0
0 0 3 4 0 0 0 0 0 0
0 0 0 5 0 0 0 0 0 0
0 0 0 6 7 0 0 0 0 0
0 0 0 0 8 9 10 11 0 0
0 0 0 0 0 0 0 0 12 0
0 0 0 0 0 0 0 0 13 0
0 0 0 0 0 0 0 0 0 0



%๋ฑ€์˜ ๋จธ๋ฆฌ๋Š” ํ•ญ์ƒ ๊ผฌ๋ฆฌ๋‚˜ ๋ชธ์˜ ์œ„์น˜๋ณด๋‹ค ์™ผ์ชฝ ๊ทธ๋ฆฌ๊ณ  ์œ„์ชฝ์— ์กด์žฌํ•œ๋‹ค.
%input.txt ํŒŒ์ผ์„ ์ฝ์–ด์„œ output.txt ํŒŒ์ผ๋กœ ์ถœ๋ ฅํ•˜๋Š” ๊ฒƒ์„ ๋ชฉํ‘œ๋กœ ํ•œ๋‹ค.
%๋ฑ€์€ ํ•œ์ƒ 90๋„๋กœ ๊บฝ์—ฌ์žˆ๋‹ค. ์ฆ‰, ๋Œ€๊ฐ์„ ์œผ๋กœ ์—ฐ๊ฒฐ๋˜์–ด ์žˆ์ง€ ์•Š๋‹ค!

*Sample code for read file and Dynamic allocation.


FILE * fp;
 fp = fopen("input.txt","r");

 //Read Width, Height
 int w,h;
 fscanf(fp,"%d",&w);
 fscanf(fp,"%d",&h);

 //Dynamic allocation about w,h sizes
 int **map;
 map = new int*[h];
 for(int i=0; i<h; ++i)
  map[i] = new int[w];

 //Read map information
 for(int i=0; i<h; ++i)
  for(int j=0; j<w; ++j)
   fscanf(fp,"%d",&(map[i][j]) );

 //Confirmation
 for(int i=0; i<h; ++i)
 {
  for(int j=0; j<w; ++j)
   printf("%d ", map[i][j] );
  printf("\n");
 } 

 //memory release
 for(int i=0; i<h; ++i)
  delete map[i];
 delete[] map;
 //File close
 fclose(fp);

///

9/05/2011

What is a Recursive Call? and Make Fibonacci sequence function using Function of the Recursive Call type.

Recursive call is that this method call oneself.
Specially, Function uses this method.
Below C Source is example for recursive call function.
As you see, Function RF called the RF that is name of oneself.

Now I give you one question.
Please make Fibonacci sequence function using recursive call method.

You can see Fibonacci condition <here>

The LINUX that is name of OS is also recursive call type.
Some people said " LINUX is abbreviation of LINUX is not UNIX. "
Here, LINUX is call LINUX is not UNIX. In this sentence, LINUX is call LINUX is not UNIX again..
so..like that

(((((LINUX is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX

This case sink into the infinity roof because there is not escape condition. so we have to be careful when we use recursive call.

<English is very difficult.. Plz someone correct my poor sentence.>

์žฌ๊ท€ํ˜ธ์ถœ์ด๋ž€ ์ž๊ธฐ๊ฐ€ ์ž๊ธฐ์ž์‹ ์„ ํ˜ธ์ถœํ•˜๋Š” ๋ฐฉ์‹์„ ๋งํ•œ๋‹ค.
ํŠนํžˆ ํ•จ์ˆ˜์—์„œ ์ด๋Ÿฐ ์ผ์„ ํ•œ๋‹ค.
์ด๋Ÿฐ ์žฌ๊ท€ํ˜ธ์ถœ ํ•จ์ˆ˜๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ๋Š”
์–ด๋–ค ์ผ์„ ํ•˜๋Š” ํ•จ์ˆ˜๊ฐ€ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์กฐ๊ฑด์— ๋Œ€ํ•˜์—ฌ ๋˜‘๊ฐ™์€ ์ผ์„ ํ•  ํ•„์š”๊ฐ€ ์žˆ์„ ๋•Œ์ด๋‹ค.
๊ทธ๋Ÿฐ๋ฐ ๋‹ค์‹œ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ์กฐ๊ฑด์ด ์ฃผ์–ด์ง€๊ณ  ๋˜๋‹ค์‹œ ๊ฐ™์€ ์ผ์„ ํ•ด์•ผํ•  ๋•Œ ์žฌ๊ท€ ํ˜ธ์ถœ ํ•จ์ˆ˜๋ฅผ ์“ด๋‹ค.
์ด๊ฑด ๋ง๋กœ ํ‘œํ˜„ํ•˜๊ธฐ ๋ฌด์ฒ™ ์–ด๋ ต๋‹ค.. ใ…Žใ…Ž

ํ•œ๊ฐ€์ง€ ์˜ˆ์ œ๋ฅผ ๋ณด์ž

----------------------------------------------

int RF(int A);

void main()
{
printf("%d\n", RF(5) );
}


int RF(int A)
{
int B=0;
if(A>1)
{
B = RF(A-1);
}

return A+B;
}

------------------------------------------------

RFํ•จ์ˆ˜๋Š” 1์—์„œ ์ž…๋ ฅ๋œ ์ˆซ์ž๊นŒ์ง€ ๋”ํ•˜๋Š” ํ•จ์ˆ˜์ด๋‹ค.
RFํ•จ์ˆ˜๋ฅผ ๋ณด๋ฉด ๋ณธ๋ฌธ์•ˆ์— ๋‹ค์‹œ ์ž๊ธฐ ์ž์‹ ์„ ํ˜ธ์ถœํ•˜๋Š” ๊ฒƒ์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.
์ด๋Ÿฐ ๋ฐฉ๋ฒ•์„ ์žฌ๊ท€ํ˜ธ์ถœ์ด๋ผ๊ณ  ํ•œ๋‹ค.

์—ฌ๊ธฐ์„œ ๋ฌธ์ œ๊ฐ€ ๋‚˜๊ฐ‘๋‹ˆ๋‹ค.
์ด๋Ÿฐ ์žฌ๊ท€ํ˜ธ์ถœ ๋ฐฉ์‹์„ ์ด์šฉํ•˜์—ฌ ํ”ผ๋ณด๋‚˜์น˜ ์ˆ˜์—ด์˜ ๊ฐ’์„ ๊ตฌํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ ๊ตฌํ˜„ํ•ด ๋ณด์‹œ์˜ค.
์ด๋ฒˆ์—๋Š” ์ข€ ์–ด๋ ค์šธ ๊ฑธ.. ใ…‹ใ…‹


์ด๋Ÿฐ ๊ฒƒ๋„ ์žฌ๊ท€ ํ˜ธ์ถœ์ผ๊นŒ?
LINUX ๋ผ๋Š” ์šด์˜์ฒด์ œ๊ฐ€ ์žˆ๋‹ค.
๊ทธ๋Ÿฐ๋ฐ ์ด๊ฒƒ์€ LINUX is not UNIX์˜ ์•ฝ์ž๋ผ๊ณ  ํ•œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ์—ฌ๊ธฐ์„œ LINUX๋Š” ๋‹ค์‹œ LINUX is no UNIX๋ฅผ ๋งŒ๋“ ๋‹ค.

๋”ฐ๋ผ์„œ ..
(((((LINUX is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX) is not UNIX

LINUX is not UNIX์—์„œ LINUX๊ฐ€ ๊ณ„์† LINUX is not UNIX๋ฅผ ์ƒ์„ฑํ•ด ๋‚ธ๋‹ค..
์ด๋ ‡๋“ฏ ์žฌ๊ท€ํ˜ธ์ถœ์€ ์กฐ๊ฑด ๋ฌธ์œผ๋กœ break๋ฅผ ์ž˜ ํ•ด์ฃผ์ง€ ์•Š์œผ๋ฉด ๋ฌดํ•œ ๋ฃจํ”„์— ๋น ์ง€๊ธฐ ์‰ฝ๋‹ค..











9/02/2011

Simple Image Processing Tool / C++ Source(MFC, OpenCV) / ๊ฐ„๋‹จํ•œ ์˜์ƒ์ฒ˜๋ฆฌ ํˆด

Created Date : 2008.10
Language : C++(MFC)
Tool : Visual C++ 6.0
Library & Utilized : OpenCV 1.0
Reference :  Image Processing Book, Learning OpenCV
etc. : -



When I teach Image Processing to undergraduate students,  this program is made for practicing programming.
This code includes simple image processing method.

ex) Image adding, reverse, Lookup Table making, Gamma adjusting, Image Zoom in/out, Rotation, Morphology, Histogram Drawing, Stretching, Laplacian, sovel, RGB, HSI, YCbCr..

The code may be useful to beginner studying image processing , MFC and OpenCV.


<source code>



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!!)---------------------------------------------------------------------------



๊ฐ„๋‹จํ•œ ์˜์ƒ ์ฒ˜๋ฆฌ ์†Œ์Šค
RAW ๋ฅผ ์˜คํ”ˆํ•˜์—ฌ
2์˜์ƒ ๋”ํ•˜๊ธฐ, ์—ญ์ƒ๊ณ„์‚ฐ, ๋ฃฉ์—…๋ฐ์ด๋ธ” ์ƒ์„ฑ, ๊ฐ๋งˆ ์กฐ์ ˆ
์˜์ƒ ์ถ•์†Œ, ์˜์ƒํ™•๋Œ€, ์˜์ƒ ํšŒ์ „
๋ชจํด๋กœ์ง€, ํžˆ์ŠคํŠธ๊ทธ๋žจ ๊ทธ๋ฆฌ๊ธฐ, ์ŠคํŠธ๋ ˆ์นญ, ํ‰ํ™œํ™”
๋ผํ”Œ๋ผ์‹œ์•ˆ, ํ‰ํ™”ํ™” ์†Œ๋ฒจ
์„ ์ฒ˜๋ฆฌํ•จ
๋˜ํ•œ BMP ํŒŒ์ผ์„ ์˜คํ”ˆํ•˜์—ฌ RGB, HSI, Ycbcr๋กœ ์ฑ„๋„์„ ๋ถ„๋ฆฌํ•œ๋‹ค.
๊ทธ๋ฆฌ๊ณ  OpenCV๋ฅผ ์ด์šฉํ•˜์—ฌ
์˜์ƒ ๋ฐ๊ธฐ ์กฐ์ ˆ, ํฌ๊ธฐ ์กฐ์ ˆ, ํšŒ์ „, ์ด์ง„ํ™”, ํŒฝ์ฐฝ, ์ˆ˜์ถ•, ํ•„ํ„ฐ๋ฅผ ์ ์šฉํ•ด ๋ณธ๋‹ค.

์••์ถ• ํŒŒ์ผ์— ์†Œ์Šค, ์ด๋ฏธ์ง€, ๊ฐ„๋žตํ•œ ์„ค๋ช… ๋ฌธ์„œ๊ฐ€ ์žˆ์Œ



<source code>



์ข‹์€ ์˜๊ฒฌ์ด๋‚˜ ๋‹ต๋ณ€ ๋‚จ๊ฒจ ์ฃผ์„ธ์š”.

SICK LMS sensor communication interface / C++ source code (MFC) / SICK ๋ ˆ์ด์ ธ ์„ผ์„œ ์ปค๋ฎค๋‹ˆ์ผ€์ด์…˜ ์†Œ์Šค


Created Date : 2010.6
Language : C++(MFC)
Tool : Visual C++ 6.0
Library & Utilized : -
Reference :  Sensor Manual, Internet Reference
etc. : SICK sensor, serial cable, power cable ... some equips about SICK









This program is SICK LMS communication application.
I made this code when I prepare 'Unmanned vehicle competition - hosted Hyundai-Kia'.
Communication method is Serial.
This zip file includes manual of SICK and useful site about LMS sensor.





reference is here http://study.marearts.com/2011/09/sick-lms-sensor-inteface-c-mfc.html

source code is here https://github.com/MareArts/LMS-Laser-sensor




--------------------------------------------------------------------------------




SICK LMS์„ผ์„œ์™€ Serial ํ†ต์‹ ์„ ํ†ตํ•˜์—ฌ ํฌํŠธ๋ฅผ ์—ด๊ณ ,
LMS์„ผ์„œ์˜ ์Šค์บ” ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์„œ ํ™”๋ฉด์— ๊ทธ๋ ค์ฃผ๋Š” ์†Œ์Šค.
LMS์˜ ๋ณด์˜ค๋“œ, ์Šค์บ” ๋ ˆ์กธ๋ฃจ์…˜, ๋‹จ์œ„๋ฅผ ์„ค์ •ํ•  ์ˆ˜ ์žˆ๋‹ค.
๋งˆ์šฐ์Šค ํœ ์„ ํ†ตํ•˜์—ฌ ๊ทธ๋ ค์ฃผ๋Š” ํ™”๋ฉด์„ ์ถ•์†Œ,ํ™•๋Œ€ ํ•  ์ˆ˜ ์žˆ๋‹ค.
(SICK ๋ฉ”๋‰ด์–ผ ํฌํ•จ, LMS์„ค๋ช… ๊ด€๋ จ ์‚ฌ์ดํŠธ ์บก์ณ ํŒŒ์ผ ํฌํ•จ)


Stereo Feature Tracking for visual odometry (document)




Created Date : 2011.2
Reference :
Robust and efficient stereo feature tracking for visual odometry
stereo odometry - a review of approaches
multiple view geometry




How to get 3D point when we know feature image points of right and left camera?
How to propagate error? if we get the 3D point that calculated including stereo distance error.
If we know translated two 3D point, How to optimize error of R, T?
This document introduces about these problems.


- contents -

① Stereo Image Point :
Left Image Image
Camera Parameters :
Focal Length f, Principal point , Baseline B
Homogeneous Point
,
Non-Homogeneous Coordinate
-(stereo odometry A Review of Approaches)
ing in Stereo Navigation L. Matthies
Noise Propagation
X point Gaussian
Mean , Covariance
X Point(3D) mean, covariance ?
f is nonlinear function of a random vector with mean , covariance
② 3D point Covariance
~ Multiple view Geometry Nonlinear Error Forward propagation
③ Estimation of motion parameters
3D points ,
X:before motion, i-th:interest point, Y:after motion
Unique solution
(X, Y will be disturbed by same amount of noise)
Mean square error
Becomes minimal?
Several solutions.
- A solution based a singular value decomposition.
- A solution based on Essential Matrix.
- A maximum likelihood solution.
④ Maximum likelihood solution


<Doc> <PDF>


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!!)

----------------------------------------------------------------------------

์Šคํ…Œ๋ ˆ์˜ค ์นด๋ฉ”๋ผ์—์„œ ํŠน์ • ์ ์— ๋Œ€ํ•œ ์™ผ์ชฝ ์˜์ƒ์—์„œ x,y์  ์˜ค๋ฅธ์ชฝ ์˜์ƒ์—์„œ x,y์  ์„ ์•Œ๋•Œ 3D point๋ฅผ ์–ด๋–ป๊ฒŒ ๊ตฌํ• ๊นŒ?
3D์„ ๊ตฌํ–ˆ์„๋•Œ ์Šคํ…Œ๋ ˆ์˜ค ์˜์ƒ์—์„œ ํฌํ•จ๋œ ์—๋Ÿฌ๊ฐ€ 3D point์— ์—๋Ÿฌ๊ฐ€ ์–ด๋–ป๊ฒŒ ์ „ํŒŒ๋ ๊นŒ?
์ด๋™๋œ ๋‘ 3D point๊ฐ€ ์ผ์„๋•Œ ์–ด๋–ป๊ฒŒ ํ•˜๋ฉด ์—๋Ÿฌ๋ฅผ ์ตœ์†Œํ™”ํ•˜๋Š” R, T๋ฅผ ๊ตฌํ• ์ˆ˜ ์žˆ์„๊นŒ?
์ด๋Ÿฐ ์งˆ๋ฌธ๋“ค์— ๋Œ€ํ•œ ๋‚ด์šฉ์— ๋Œ€ํ•œ ์†”๋ฃจ์…˜์„ ๋‹ค๋ฃฌ๋‹ค.


<Doc> <PDF>


์ข‹์€ ์˜๊ฒฌ์ด๋‚˜ ๋‹ต๋ณ€ ๋‚จ๊ฒจ ์ฃผ์„ธ์š”.

Kalman Filter hand note / ์นผ๋งŒ ํ•„ํ„ฐ ์†์œผ๋กœ ์ •๋ฆฌํ•œ ๋…ธํŠธ




Created Date : 2008.6
Reference : Probabilistic Robotics


When I studied 'Probabilistic Robotics Book', I organized Kalman filter theory by hand.
This document may be poor, because that time, understanding about kalman is insufficient.
You can download zip file. <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!!)

----------------------------------------------------

Probabilistic Robotics (sebastian thrun, wolfram burgard, dieter fox)์˜ ์ €์„œ์— ๋‚˜์˜ค๋Š”
์นผ๋งŒ ํ•„ํ„ฐ์— ๋Œ€ํ•˜์—ฌ ์†์œผ๋กœ ์ •๋ฆฌํ•˜์˜€์Šต๋‹ˆ๋‹ค.


๋ฒ ์ด์ฆˆ ํ•„ํ„ฐ ์ •๋ฆฌ
-๋ฒ ์ด์ฆˆ ํ•„ํ„ฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์œ ๋„
์นผ๋งŒ ํ•„ํ„ฐ ์กฐ๊ฑด
-์นผ๋งŒ ํ•„ํ„ฐ์˜ ์„ ํ˜• ์กฐ๊ฑด, ๊ฐ€์šฐ์‹œ์•ˆ ์กฐ๊ฑด ์„ค๋ช…
์นผ๋งŒ ํ•„ํ„ฐ ์•Œ๊ณ ๋ฆฌ์ฆ˜
-์นผ๋งŒ ํ•„ํ„ฐ ๋™์ž‘ ์›๋ฆฌ ๊ทธ๋ฆผ๊ณผ ์ˆ˜์‹์œผ๋กœ ํ‘œํ˜„
์นผ๋งŒ ํ•„ํ„ฐ ์ˆ˜ํ•™์  ์ฆ๋ช… 6page
- ์˜ˆ์ธก, ์ž…๋ ฅ, ์—…๋ฐ์ดํŠธ ํŒŒํŠธ ์ •๋ฆฌ



์ด ๋ฌธ์„œ๋ฅผ ๋งŒ๋“ค ๋‹น์‹œ ์นผ๋งŒํ•„ํ„ฐ์— ๋Œ€ํ•œ ์ดํ•ด๊ฐ€ ๋ถ€์กฑํ•˜์—ฌ์„œ, ์ข‹์€ ์ž๋ฃŒ๊ฐ€ ๋ ์ง€ ๋ชจ๋ฅด๊ฒ ์Šต๋‹ˆ๋‹ค. ^^
์ „์ฒด ํŒŒ์ผ์€ ์—ฌ๊ธฐ์„œ ๋‹ค์šด ๋ฐ›์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. <here>


์ข‹์€ ์˜๊ฒฌ์ด๋‚˜ ๋‹ต๋ณ€ ๋‚จ๊ฒจ ์ฃผ์„ธ์š”.