fyquah / fishotron

Fishotron desktop (for algorithm debugging purposes)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Usefule information

To run

~~bash

mkdir build cd build/ cmake ../ make ./main 102.168.0.1:8080

~~

The common files are everything but camera.cpp, camera.h and main.cpp

ORIGINAL README

Fishotron

This is the source code of fish-o-tron, built at Fishackathon London. This source is used in the length calculation algorithm. For the code of the web-app in the link above, visit here.

This source code uses multithread operations to handle image pooling from the webcam and parallel processes to send images and data to the server. In non-technical terms, while the program is sending data to the server, the camera and length-recording subroutines runs normally without synchronous blocking.

Dependencies

Required only if using Android's camera rather than webcam:

Setting Up

mkdir build
cd build
cmake ../
make
./json ip-address-of-camera

Algorithm Overview

  1. Detect the chilitags on the image
  2. Warp the perspective of the image and clip the portion of image surrounded by the 4 corners
  3. Convert the clipped portion into a grayscale image
  4. Carry out edge detection (Sobel Operator) on the image
  5. Filter out pixels which are not representative of the distribution
  6. Carry out minimum bounding rectangle algorithm on the filtrate of the above process to determine the rectangles points
  7. Calculate the length and width of the rectangle based on information obtain from several frame
  8. Remove annomalies from the obtain data
  9. Output the assumed length and width after annomaly detection

Architecture Overview

  1. Calculate the length and width of camera using above the algorithm
  2. Take a snapshot of the image
  3. Spawn a new process to upload the image to AWS S3 and data to public fish server
  4. Terminate child process

About

Fishotron desktop (for algorithm debugging purposes)


Languages

Language:C++ 78.1%Language:Makefile 17.7%Language:Python 3.1%Language:CMake 1.1%