This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//2017-05-11 fix bugg index was wrong before m32_conv0 = convolute_mat2(&Feature0Kernel[31][0], FE0KSIZESQR, FE0KSIZESQR, m1_0_padded, int (m1_0_padded.cols));// Make a convolution of the image | |
//2017-05-07 find bugg Mat pol_c_m1_unpad(C2M_H,C2M_W,CV_32F); was before bug fix ..C2M_H,C2M_H.. | |
//2017-05-05 32x32x32 feature stright connection | |
//2017-05-05 FIX so kernel update weight direct after each pixel step (before there was a sum up all steps togheter dont work prorper). So now the kerenle patches traingin much much faster and better | |
//the kernels feature now adapt and look's much more like it correspond to the traingin images. | |
//Add dropout on fully connected HiddenNodes prevent overtraning | |
//2017-01-17 fix bugg in make_SumChangeFeature0Weights replace c_m1 with m1_conv0 | |
//Ask of loading any reruned training turn | |
//Rerun fully connected weights (10 times) and lock kernel layer 0 after (2) rerun lock kernel layer 1 after (4) reruns | |
//Show all kernels in 3 windows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Fix bugg 2017-05-10 (....C2M_W....) before (C2M_H,C2M_H... | |
//Mat pol_c_m1_unpad(C2M_H,C2M_W,CV_32F);//After second pooling befor padding | |
//2017-05-05 FIX so kernel update weight direct after each pixel step (before there was a sum up all steps togheter dont work prorper). So now the kerenle patches traingin much much faster and better | |
//the kernels feature now adapt and look's much more like it correspond to the traingin images. | |
//File: NN18.cpp | |
//2017-01-17 fix bugg in make_SumChangeFeature0Weights replace c_m1 with m1_conv0 | |
//Ask of loading any reruned training turn | |
//Rerun fully connected weights (10 times) and lock kernel layer 0 after (2) rerun lock kernel layer 1 after (4) reruns | |
//Show all kernels in 3 windows | |
//In this example 6 output nodes and explaned training images set in start of program. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################### | |
cmake_minimum_required (VERSION 2.8) | |
project (raspicam_test) | |
set(CMAKE_MODULE_PATH "/usr/local/lib/cmake/${CMAKE_MODULE_PATH}") | |
find_package(raspicam REQUIRED) | |
find_package(OpenCV) | |
IF ( OpenCV_FOUND AND raspicam_CV_FOUND) | |
MESSAGE(STATUS "COMPILING OPENCV TESTS") | |
#SET_SOURCE_FILES_PROPERTIES( gpio_test.c PROPERTIES LANGUAGE CXX ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step by step installation I made on my Rasperry pi 3 | |
This will install: | |
I/O pins bcm2835, OpenCV, Raspicam, Codeblocks, wxSmith, wxWidgets | |
Here we go.. | |
Install Windisk32 on your ordernary computer | |
download RASPBIAN JESSIE WITH PIXEL disk image from | |
https://www.raspberrypi.org/downloads/raspbian/ | |
to a 16Gb micro SD card use Windisk32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#File: CMakeLists.txt | |
#be in /home/pi/olle/pi/pos_neg directory and type: | |
#sudo cmake ./CMakeLists.txt | |
#sudo make | |
#sudo ./test_prog | |
##################################### | |
cmake_minimum_required (VERSION 2.8) | |
project (raspicam_test) | |
set(CMAKE_MODULE_PATH "/usr/local/lib/cmake/${CMAKE_MODULE_PATH}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#File: CMakeLists.txt | |
#be in /home/pi/olle/pi/verify directory and type: | |
#sudo cmake ./CMakeLists.txt | |
#sudo make | |
#sudo ./test_prog | |
##################################### | |
cmake_minimum_required (VERSION 2.8) | |
project (raspicam_test) | |
set(CMAKE_MODULE_PATH "/usr/local/lib/cmake/${CMAKE_MODULE_PATH}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Generate Verify samples | |
//File: test_prog.cpp | |
//You must make a director /positive_data/ where this program could put the pictures in | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <ctime> | |
#include <iostream> | |
#include <raspicam/raspicam_cv.h> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Generate Positive samples | |
//File: test_prog.cpp | |
//You must make a director /positive_data/ where this program could put the pictures in | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <ctime> | |
#include <iostream> | |
#include <raspicam/raspicam_cv.h> | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################### | |
cmake_minimum_required (VERSION 2.8) | |
project (raspicam_test) | |
SET(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} /home/pi/OpenCV/opencv-3.2.0/release) | |
set(CMAKE_MODULE_PATH "/usr/local/lib/cmake/${CMAKE_MODULE_PATH}") | |
find_package(raspicam REQUIRED) | |
find_package(OpenCV) | |
IF ( OpenCV_FOUND AND raspicam_CV_FOUND) | |
MESSAGE(STATUS "COMPILING OPENCV TESTS") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------------- | |
# Basic Configuration | |
# ---------------------------------------------------------------------------- | |
CMAKE_MINIMUM_REQUIRED(VERSION 2.8) | |
PROJECT(raspicam) | |
set(PROJECT_VERSION "0.1.2") | |
string(REGEX MATCHALL "[0-9]" PROJECT_VERSION_PARTS "${PROJECT_VERSION}") | |
list(GET PROJECT_VERSION_PARTS 0 PROJECT_VERSION_MAJOR) | |
list(GET PROJECT_VERSION_PARTS 1 PROJECT_VERSION_MINOR) |