Peeter 2013: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Rprosso (talk | contribs)
No edit summary
Rprosso (talk | contribs)
No edit summary
Line 85: Line 85:
===Muud IDEED===
===Muud IDEED===


=XIMEA UPDATE FOR OPENCV=
Open page http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/
Download OpenCV-2.4.3.tar.bz2
Unpack
tar -xf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
Update
Download opencv_ximea_update_2_4_3_A.zip and replace OpenCV-2.4.3 files by files in attachment to untarred directory of opencv:
(opencv_untarred)/highgui/src/cap_ximea.cpp
(opencv_untarred)/highgui/CMakeLists.txt
(opencv_untarred)/cmake/OpenCVFindXimea.cmake
Install needed libraries
sudo apt-get install libgtk2.0-dev
sudo apt-get install pkg-config
Build
mkdir build
cd build
# on some systems "-D WITH_TIFF=NO" should be added to options
cmake -D WITH_XIMEA=YES ..
make
Install
sudo make install
Example
Source code
Create file opencv_test.cpp with following content
#include "cv.h"
#include "highgui.h"
#include <stdio.h> 
// A Simple Camera Capture Framework
int main()
{
  CvCapture* capture = cvCaptureFromCAM( CV_CAP_XIAPI );
  if ( !capture ) {
    fprintf( stderr, "ERROR: capture is NULL \n" );
    getchar();
    return -1;
  }
  // Create a window in which the captured images will be presented
  cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
  // Show the image captured from the camera in the window and repeat
  while ( 1 ) {
    // Get one frame
    IplImage* frame = cvQueryFrame( capture );
    if ( !frame ) {
      fprintf( stderr, "ERROR: frame is null...\n" );
      getchar();
      break;
    }
    cvShowImage( "mywindow", frame );
    // Do not release the frame!
    //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
    //remove higher bits using AND operator
    if ( (cvWaitKey(10) & 255) == 27 ) break;
  }
  // Release the capture device housekeeping
  cvReleaseCapture( &capture );
  cvDestroyWindow( "mywindow" );
  return 0;
}
Example downloaded from: http://opencv.willowgarage.com/wiki/CameraCapture
Compiling
g++ -I/usr/local/include/opencv opencv_test.cpp -lopencv_highgui
# result will be a.out
Starting
Normal:
./a.out
Some environments needs to force library path:
LD_LIBRARY_PATH=/usr/local/lib ./a.out


----
----

Revision as of 14:53, 12 November 2013

Tiim Peeter eelnevatel aastatel

Robotex 2013

ToDo

Bürokraatia

  • Laupäev 13.aprill Robosse koosolekule, projekti arutama (Kellaaeg Pole Veel Kindel! VAATA! Robolisti)
  • Kaasa lüüa TIIGRIHÜPPE Projektis, et saada klubile RAHA
    • Mõelda kiiremas korras, mida meie arvame, et oleks klubis vaja
      • Tööriistu
      • Materjale
      • Tehnikat
      • Robotile lisa asju jne...
  • Leida sponsoreid, et saada veidi lisa raha juurde
  • Otsida paik, firma, kes laseks korralikus pingis roboti detailid välja

Tehniline

  • Modelleerida roboti põhjaplaat, et pärast CNC pingis välja lõigata
    • Arvestada tuleks:
      • Kondekatega -- Suurust ja mahtuvust peab veel mõtlema
      • Mootorid -- Ei ole täpselt kindel, millised mootorid tulevad, tuleb oodata kontrollerite katsetust
      • Kontrollerid mootoritele -- Samuti ootame, kas uued kontrollerid töötavad
      • Löögimehanism ja rullik -- Seda saab mõelda kuna kaamera ja objektiivi suurused teada
  • Modelleerida roboti teise korruse plaat
    • Enne esimese korruse valmimist ei saa suurt midagi püsivat mõelda.
    • Arvestada tuleks:
      • Emaplaadiga
      • Mikrokontrolleriga
      • Akudega - Neis peaks tulema taas kaks või kolm / Vanalt robotilt

Progemine

  • Kui me tahame säilitada 2012 aasta koodi ka robovison2013 SVN-is tuleks teha commit kiiremas korras!
  • Võiks proovida koodi, mis Lennart vb veidi leiutanud

Juppide List

Olemas olevad jupid:

  • PS3 Eye
  • Arduino mega & shield
  • SSD 64GB
  • Omniwheels

Tellitud jupid

  • USB3 Kaamera
  • Fix obje kaamerale
  • Emaplaat, prosega
  • RAM(loogiliselt) Võiks ka olemas olla

Mida vaja tellida

  • Mootorid
  • Kontrollerid mootoritele
  • Rulliku mootor
  • Lülitid
  • Varjestatud kaablit
  • Pistikud


Idee nurk

Tehniline

  • Kasutada kaht või kolme kaamerat
  • Musta joone tuvastamiseks ainult põhjaandur
  • Kui leiame ressurssi proovida 1,5 - 3mm objektiivi kaameral

Progemine

Muud IDEED

XIMEA UPDATE FOR OPENCV

Open page http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/ Download OpenCV-2.4.3.tar.bz2 Unpack tar -xf OpenCV-2.4.3.tar.bz2 cd OpenCV-2.4.3 Update Download opencv_ximea_update_2_4_3_A.zip and replace OpenCV-2.4.3 files by files in attachment to untarred directory of opencv: (opencv_untarred)/highgui/src/cap_ximea.cpp (opencv_untarred)/highgui/CMakeLists.txt (opencv_untarred)/cmake/OpenCVFindXimea.cmake Install needed libraries sudo apt-get install libgtk2.0-dev sudo apt-get install pkg-config Build mkdir build cd build

  1. on some systems "-D WITH_TIFF=NO" should be added to options

cmake -D WITH_XIMEA=YES .. make Install sudo make install Example Source code Create file opencv_test.cpp with following content

  1. include "cv.h"
  2. include "highgui.h"
  3. include <stdio.h>

// A Simple Camera Capture Framework int main() {

  CvCapture* capture = cvCaptureFromCAM( CV_CAP_XIAPI );
  if ( !capture ) {
    fprintf( stderr, "ERROR: capture is NULL \n" );
    getchar();
    return -1;
  }
  // Create a window in which the captured images will be presented
  cvNamedWindow( "mywindow", CV_WINDOW_AUTOSIZE );
  // Show the image captured from the camera in the window and repeat
  while ( 1 ) {
    // Get one frame
    IplImage* frame = cvQueryFrame( capture );
    if ( !frame ) {
      fprintf( stderr, "ERROR: frame is null...\n" );
      getchar();
      break;
    }
    cvShowImage( "mywindow", frame );
    // Do not release the frame!
    //If ESC key pressed, Key=0x10001B under OpenCV 0.9.7(linux version),
    //remove higher bits using AND operator
    if ( (cvWaitKey(10) & 255) == 27 ) break;
  }
  // Release the capture device housekeeping
  cvReleaseCapture( &capture );
  cvDestroyWindow( "mywindow" );
  return 0;

}

Example downloaded from: http://opencv.willowgarage.com/wiki/CameraCapture Compiling g++ -I/usr/local/include/opencv opencv_test.cpp -lopencv_highgui

  1. result will be a.out

Starting Normal: ./a.out Some environments needs to force library path: LD_LIBRARY_PATH=/usr/local/lib ./a.out


Kontaktinfo

  • Lennart Lüsi
  • e-mail: datafly@risk.ee
  • Raul Prosso
  • e-mail: raul.prosso@gmail.com
  • Skype: raul514
  • Madis Mark
  • e-mail: mmark@itcollege.ee
Robot "N:I:M:E:T:U" 2013
Ülikool: Eesti Infotehnoloogia Kolledž
Tüüp: Robootika - Jalgpallirobot
Meeskond "Peeter": Lennart Lüsi
Raul Prosso
Madis Mark
Janno Tomingas
Juhendaja: Margus Ernits