Giter Site home page Giter Site logo

fish_box's Introduction

Fish box

This repo features an image processing algorithm that undistorts images along with segmentation of cod and classification of damage to cod.

The input is pictures of cod and the output is an image where wound on cod is marked and tagged along with a CDI (catch damage index). The CDI marks which image file names that contains cod with wounds.

How to use

  1. Put cod images into fish_pics/input_images.

  2. Select the run mode by setting the script parameters in the configurations or passing them in command line/terminal/shell. How to pass arguments for a python script :

    • "n" : Run the program using only openCV functions
    • "y" : Run the program using own built functions
    • "y e": Run the program using own built functions, and see not yet finished version of future implementations

    NOTE: when running the program using own built functions it normally takes 420 sec. for one image. Consider having only few images in fish_pics/input_images

  3. The output is saved.

    1. Images for manual inspection is saved in fish_pics/output_images/manual_inspection
    2. Images for manual inspection with CLAHE applied is saved in fish_pics/output_images/manual_inspection_CLAHE
    3. Images where wounds are marked are saved in fish_pics/output_images/marked_images
    4. The CDI is saved in output_CDI
  • Optional: run recalibration of intrinsic parameters for undistortion:
    1. Put checkerboard images into calibration/checkerboard_pics
    2. Run the python script calibration/main_harris-corner-detection.py. A .mat file is generated - "calibration/image_points_checkerboard/image_points_for_MATLAB.mat"
    3. Run the MATLAB script calibration/GetCameraParameters.m that uses the .mat file generated from previous step. The script generates the parametres k_1, k_2, imgCenterX, imgCenterY, Fx and Fy, that is py into parameters.yaml. The intrinsic parameters are now calibrated

Reference to algorithms and math used in code

  1. Grass fire algorithm
  2. Harris corner detection
  3. Thresholding
  4. Find center of contur mass
  5. Camera calibration
  6. Blur

Morphology

  1. Erosion
  2. Dialation
  3. Opening
  4. Closing
  5. Sobel operator

Color converting

  1. Gray scaling
  2. RGB to HSV

fish_box's People

Contributors

kasperfg16 avatar benmusak avatar kajmoerk avatar madsrossen avatar matchr19 avatar kajmork avatar

Watchers

 avatar

fish_box's Issues

Revers row and col

col, row = np.shape(file)

they ar reversed, and so are x and y too.

fish_box/sobel_filter.py

Lines 23 to 29 in 2ea982b

Iy = np.sum(np.multiply(gy, file[x:x+3, y:y+3])) # multiply two 3x3 matrix together in y
Ix = np.sum(np.multiply(gx, file[x:x+3, y:y+3])) # multiply two 3x3 matrix together in x
Iyy[x, y] = Iy
Ixx[x, y] = Ix
sobel_image[x, y] = np.sqrt(Ix**2 + Iy**2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.