How to see the plot of the desired matrix through the figure statement?

1 回表示 (過去 30 日間)
kyoung won Min
kyoung won Min 2021 年 8 月 11 日
コメント済み: kyoung won Min 2021 年 8 月 14 日
I am now constructing the faster-rcnn code.
"vehicleDataset" as an input dataset, with the first column being the image name and the second column being the 1X4 matrix.
  1. I would like to take the pictures of (1,1), (3,1), (4,1) and so on,, individually and check the pictures. However, "vehicleDataset" is in table format and the contents in each column are in cell format. That is, if i want to see the picture of (3,1) how do i organize the code?! I don't know how to load Cell type data in the table.
  2. The second row of "vehicleDataset" consists of a cell of (1,4). I don't know the meaning of the numbers in the cell (1,4). I think the RCNN code has numbers for hitting a square box, so each one has a number, not a coordinate?!
  3. On the other hand, where is the way to make a table with Cell-type data?!
Thank you for listening to my question.

採用された回答

Dave B
Dave B 2021 年 8 月 11 日
Tables actually make this very easy, because you can refer to the variable names. But you can also index as you did in your example, you'd just need to as a {1} to get the first 'element' of the cell (there's only one element in each cell in your examples). I've showed both below:
ImageFilename={'vehicleImages/image_00001.jpg';'vehicleImages/image_00002.jpg'};
vehicle={[220 136 35 28];[175 126 61 45]};
vehicleDataset=table(ImageFilename,vehicle)
vehicleDataset = 2×2 table
ImageFilename vehicle _________________________________ _________________ {'vehicleImages/image_00001.jpg'} {[220 136 35 28]} {'vehicleImages/image_00002.jpg'} {[175 126 61 45]}
% Preferred
fn=vehicleDataset.ImageFilename{2}
fn = 'vehicleImages/image_00002.jpg'
v = vehicleDataset.vehicle{2}
v = 1×4
175 126 61 45
% Using numeric indexing:
fn=vehicleDataset{1,1}{1}
fn = 'vehicleImages/image_00001.jpg'
v = vehicleDataset{1,2}{1}
v = 1×4
220 136 35 28

その他の回答 (0 件)

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by