EUTAFT Log

From Control Systems Technology Group
Revision as of 18:23, 8 January 2020 by S153373 (talk | contribs) (Created page with 'We're in the process of updating the computer and camera of the football table. We took the existing software as a starting point; first goal is to make this work on the new hard…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

We're in the process of updating the computer and camera of the football table. We took the existing software as a starting point; first goal is to make this work on the new hardware (meaning pc + camera).

There are currently two main parts of the software:

  1. the Vision software, a c++ based application
  2. and the Motion software, a Simulink based model

Quick update on what has been done on the Vision software so far:

  1. Made the new pc 'ready' by installing the required libraries etc.
  2. Updated deprecated functions etc. in Qtvision software, such that the project could be build on the new computer at all. A more detailed log of this can be found in the git, but it shouldn't be necessary to dive into this again (ADDLINK).
  3. Took the old camera, and further debugged the code on the new pc. (For your reference, a working version of this project is located in ADDLINK)
  4. Took the new camera, and updated the camera calls in the old code. A log of this (and also the previous step) is also located in the git. I do advise to take a look at this, because this is basically where I left off. The most recent version of Qtvision can be found here: ADDLINK

Let me try and explain that last point a bit more in detail and afterwards what needs to be done now...

Simply put, a new camera means a new API. Instead of using PvApi, we now use the Pylon API. PvApi is a C based library that was used in camera.c/camera.h to implement the camera functionalities. This was then compiled into another library (in terminal while being root user "make && make install" in SVN_backup/src/camera) that was used in the rest of the Qtvision project. Pylon API has a C++ API, so the camera related code is now included in the Qt Creator project itself (camera.cpp & camera.h).

Documentation & example code features Pylon API (use menu on left to go through features): https://docs.baslerweb.com/features.html

So what now? We can grab images using the new camera (yay) with our Qtvision application, so the next step would be to have a better look at the processing of these images. Most of this is done in visionexecute.cpp, but there are also still a few things that need another look in camera.cpp as well (please ctrl+F for TODO!). As can be seen when running the program the view is a bit green (in Qtcreator save, build, and run using respectively ctrl+S, ctrl+B, and ctrl+R). Green = Black...yep, due to post-processing black pixels are displayed greenish right now, this needs to be solved! Increasing the exposure time (ET in the GUI) already helps a bit, because more light (duh)... There are a few camera settings (see camera.cpp) and post-processing (visionexecute.cpp) that should be looked into. Furthermore, we need to re-calibrate, the old wiki explains how to do this. To be able to do camera and color calibration though, the callback for grabbing one frame instead of continuously grabbing needs to be implemented still (NEED TO BETTER EXPLAIN THIS PROBABLY).