How to save Matlab Video Labeller bounding box coordinates as integers

1 回表示 (過去 30 日間)
Nitin Kumar
Nitin Kumar 2020 年 10 月 28 日
回答済み: Kiran Felix Robert 2020 年 11 月 4 日
I am trying to use automation techniques to label bounding box coordinates in a video. The problem is that Video Labeller saves all the coordinates in form of float values. How can I get the Video Labeller app to store all the coordinates in form of uint8?

回答 (1 件)

Kiran Felix Robert
Kiran Felix Robert 2020 年 11 月 4 日
Hi Nitin,
It is my understanding that you are trying to store the bounding box coordinate data, returned by the video labeller app, to unsigned 8-bit integer data.
The position field of ‘gtruth.labelData’ can be used to access the Coordinate values, as show in the Get Started with the Video Labeler document
You can convert a floating value to integer by using the uint8() type conversion as shown below,
K = 1.908;
int_K = uint8(K);
To increase precision you may try the following,
K = 1.908; % Initial Value
precisionK = 10*K; % 1 decimal precision with 10;
intPresK = uint8(precisionK)
Kiran Felix Robert

カテゴリ

Help Center および File ExchangePoint Cloud Processing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by