2d_tile_detector

Minimal, OpenCV-based library for detecting 2d pose of tiles

https://github.com/gramaziokohler/2d_tile_detector

Science Score: 72.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    2 of 2 committers (100.0%) from academic institutions
  • Institutional organization owner
    Organization gramaziokohler has institutional domain (gramaziokohler.arch.ethz.ch)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.7%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Minimal, OpenCV-based library for detecting 2d pose of tiles

Basic Info
  • Host: GitHub
  • Owner: gramaziokohler
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 7.09 MB
Statistics
  • Stars: 2
  • Watchers: 12
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Created almost 3 years ago · Last pushed almost 3 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Authors

README.md

Perception: OpenCV-based 2D tile detector

DOI

Required software

  1. FLIR's SpinView. From here
  2. MATRIX VISION mvBlueCOUGAR suite. From here

Required hardware

  1. A network adapter which supports jumbo frames.
  2. A camera, duh..

Installation

conda env create -f environment.yml

Calibration

Set Image Format to RBG8

Make sure the camera's image format is RGB8 (default seems to be BayerRG8): 1. Start mvDeviceConfigure(x64) 2. Double-click the desired device from the list. This will open an instance of the wxPropView application for the specific camera. 3. Stop image acquisition by clicking on Acquire 4. Go to Setting->Base->Camera->GenICam->ImageFormatControl and change PixelFormat to BGR8 5. Hit Ctrl+S to save 6. Close the settings application

image_format

Measure Board Properties

The width and height of the board are the number of squares across the width and height of the board. Only the inner corners which connect two squares are to be counted. These are market with red circles. board_count

Therefore, the board in the picture has 7 squares across one dimension and 4 across the other (are landscape and portrait interchangeable?)

The size of a square is simply the real-life size of a single square measured in centimeters.

Running the Calibration

Use the following arguments: --url "C:\Program Files\MATRIX VISION\mvIMPACT Acquire\bin\x64\mvGenTLProducer.cti" - The path to the GenTL producer endpoint. -m Blackfly S BFS-PGE-31S4C"- use the connected "Blackfly S BFS-PGE-31S4C" --width 7 - number of inner corners across the board's width --height 4- number of inner corners across the board's height --square_size 3.5 - square size in cm

The calibration script will append the current date and time to the file's name! commandline python .\calibration.py --url "C:\Program Files\MATRIX VISION\mvIMPACT Acquire\bin\x64\mvGenTLProducer.cti" --width 7 --height 4 -m "Blackfly S BFS-PGE-19S4C" --square_size 3.5 --save_file "C:\Users\ckasirer\Downloads\calibration.cal"

The camera feed should now show up. If it doesn't, check out the troubleshooting section to make sure the camera is properly detectable.

Press c to trigger the calibration. Check the terminal output, it should state: commandline Image captured, object points found

If the following message appears: commandline Image captured but NO object points found Try moving the checkerboard around a bit, and make sure that the count and dimensions of the squares is correct.

To finish, press q. The calibration program will save the calibration data to the provided output file path. You should see the message: commandline Calibration is finished. RMS: x.xxxxxxxxxxxxxxx

The result file should look something like this: ```

%YAML:1.0

K: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 1.2324533133958817e+03, 0., 1.0888207398469019e+03, 0., 1.2524057141123801e+03, 6.1500193355283000e+02, 0., 0., 1. ] D: !!opencv-matrix rows: 1 cols: 5 dt: d data: [ -1.6552682272717364e-01, -7.4027753806342909e-03, 1.9001888186245344e-03, -3.7763582719531778e-02, 1.4750392962499670e-02 ] R: !!opencv-matrix rows: 3 cols: 1 dt: d data: [ 4.6140803507142211e-03, 1.0347721391158395e-03, -3.5433204829117204e-01 ] T: !!opencv-matrix rows: 3 cols: 1 dt: d data: [ -2.4730677451507656e+01, -5.8149409719023204e+00, 3.5763223775899661e+01 ] NK: !!opencv-matrix rows: 3 cols: 3 dt: d data: [ 1.0977514648437500e+03, 0., 1.0396554652077612e+03, 0., 1.0781127929687500e+03, 6.1744659614560078e+02, 0., 0., 1. ] ROI: !!opencv-matrix rows: 4 cols: 1 dt: d data: [ 39., 67., 1517., 1106. ] ```

Troubleshooting

Interface not responsive / Camera missing from device list

It is occasionally the case that mvDeviceConfigure or wxPropView are not responsive and/or all/some of the devices are missing from the device list interface. Restarting the switch and re-detecting the cameras with FLIR's SpinView app has shown remarkable success rates restoring the camera interface to functioning state.

Shake the tree by following all or some of these steps as you see fit: 1. Power-cycle the PoE switch 2. Reconnect the (USB) NIC to your station 3. Open the SpinView app and search for any devices which appear with a red exclamation mark icon. 1. Double click the failed camera and let SpinView re-configure it

Now try again in mvDeviceConfigure, all connected devices should be listed.

Owner

  • Name: Gramazio Kohler Research
  • Login: gramaziokohler
  • Kind: organization
  • Location: Zürich, Switzerland

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use 2D Tile Detector on your work, please cite it as below."
authors:
- family-names: "Kasirer"
  given-names: "Chen"
  orcid: "https://orcid.org/0009-0009-0699-8442"
- family-names: "Casas"
  given-names: "Gonzalo"
  orcid: "https://orcid.org/0000-0002-2061-1533"
- family-names: "Pok Yin Leung"
  given-names: "Victor"
  orcid: "https://orcid.org/0000-0003-1536-8636"
title: "OpenCV-based 2D Tile Detector."
doi: 10.5281/zenodo.7712950
version: v0.1.0
date-released: 2023-03-09
repository-code: "https://github.com/gramaziokohler/2d_tile_detector"
url: "https://github.com/gramaziokohler/2d_tile_detector"

GitHub Events

Total
Last Year

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 13
  • Total Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.462
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Chen Kasirer c****r@e****h 7
Gonzalo Casas c****s@a****h 6
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels