-
Notifications
You must be signed in to change notification settings - Fork 189
FindObjectsWithWebcam
This tutorial will show how to add an object using your webcam. Note that version 0.4 is used here.

- Open Find-Object application.

- If it is the first use of Find-Object, go to next step; otherwise, restore all default settings (menu "Edit->Restore all default settings")

- Press space to start the webcam. Note that by default, the view is mirrored (you can change this with a right-click on the scene or by changing the parameter "General/mirrorView" using menu "View->parameters").

- Open "Edit" menu and select "Add object from scene...".

- Place an object in front of the camera and press "Take picture".

- Select the region representing the object.


- Press next to verify your selection. Then press "End".

- Back to main window, you should see the object in the side pane.

- Put your object back in front of the camera to see the detection.


- If the scene doesn't have many features, there may have some bad detections like below. If your scene doesn't contain many features, try General/InvertedSearch mode. For the next, this mode is used.


- You can add more objects if you want.



- You can also right-click on the camera view and uncheck "Show features".


Find-Object 0.4.3 required
Some information about objects detected like ID and position are sent over TCP on a port.
-
Publish detected objects (with position, rotation, scale and shear), formatted as
[ObjectId1, objectWidth, objectHeight, h11, h12, h13, h21, h22, h23, h31, h32, h33, ObjectId2...]where h## is a 3x3 homography matrix (h31 = dx and h32 = dy, see QTransform). Example handling the message (TcpClient.cpp, TcpClient.h and main.cpp). -
Raw format:
[quint16 (size in bytes of the following QVector<float>) QVector<float>]. TheQVector<float>should have a size of 12 float X number of objects. -
Note that parameter
Homography/homographyComputedmust be true (default true) in order to publish the topic. -
Parameter
General/mirrorViewwould be false in order to visualize correctly the homography values returned. -
You can set manually a port, see parameter
General/port. -
On ROS, a topic named "/objects" containing the same data is sent. See here.
