Changes between Version 31 and Version 32 of VisionFramework


Ignore:
Timestamp:
Nov 25, 2017, 11:30:52 AM (7 years ago)
Author:
benjialbert
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • VisionFramework

    v31 v32  
    212212* {{{Main_class = name of the class file with main method}}}
    213213 * For example, where {{{Vision.class}}} is the class file, {{{Main_class = Vision}}}
     214----
     215----
     216----
     217=== C++ Projects with OpenCV ===
     218'''NOTE: our performance doubled when we transitioned to C++ from Java'''
     219
     220Let's install an IDE so we do not have to keep writing in vi/vim/nano:
     221{{{
     222sudo apt-get install codeblocks
     223}}}
     224
     225We experienced a bug that constantly crashed CodeBlocks:
     226Navigate to: {{{Settings -> Editor -> Code completion -> Symbols browser}}} and check {{{Disable symbols browser}}}
     227(the {{{Code completion}}} tab is on the west panel of the configure editor.)
     228
     229Navigate to: {{{File -> New -> Project -> Console Application}}}
     230and fill in the fields that come up.
     231
     232If your {{{Management}}} tab is not visible, open it by selecting: {{{View -> Manager}}}
     233Also, if your {{{Logs & others}}} tab is not open already, select {{{View -> Logs}}}
     234
     235Now right click your project in the {{{Management}}} tab and navigate to: {{{Build options... -> Linker settings}}}
     236
     237Under the {{{Link libraries}}} panel, select {{{Add}}} and select all OpenCV shared object (.so) files located in {{{/home/pi/opencv/build/lib/*.so}}}
     238(You can [ctrl + left-click] multiple *.so] files to add them all at once)
     239
     240Now let's navigate to: {{{Search directories -> Linker}}}
     241In the {{{Linker}}} tab, select {{{Add}}} and add the path to your opencv lib: {{{/home/pi/opencv/build/lib}}}
     242
     243===== Tricks and Tips =====
     244Using OpenCV with the Raspberry Pi 3 ribbon cable camera is a little cumbersome because you cannot use many of the VideoCapture.set(char*,int) functions.[[BR]]
     245Instead, we use system commands to set camera settings via the v4l2-ctl library.
     246
     247For FRC retroreflective tape segmentation, use the following system commands to prevent auto adjustment features such as {{{auto exposure}}}, {{{white balance}}}, and {{{exposure time}}}:
     248* v4l2-ctl --set-ctrl=auto_exposure=1
     249* v4l2-ctl --set-ctrl=white_balance_auto_preset=0
     250* v4l2-ctl --set-ctrl=auto_exposure_bias=0
     251* v4l2-ctl --set-ctrl=exposure_time_absolute=100
     252
     253Make your C++ program set these options by using the {{{stdlib.h}}} {{{system(char*)}}} command which simply takes a string command as input.