select a subset of images according to the "image name list.txt" that matches a "1" in the "ground truth list.txt"

3 ビュー (過去 30 日間)
riad didou
riad didou 2020 年 7 月 2 日
編集済み: riad didou 2020 年 7 月 2 日
Hi
i have a ground truth list and image names list separately (with the same number of lines); that is means each line "0 or 1" in the ground truth correspond to one image name; i would like to use this information to select all the images (put it in a new folder) from my dataset that matches "1" in the ground truth.
Please, is there any trick to achieve that?

回答 (1 件)

madhan ravi
madhan ravi 2020 年 7 月 2 日
c = "image name 1.txt"
c1 = "ground truth 1.txt"
C = c(regexp(c, '\d*', 'match') == regexp(c1, '\d*', 'match'))
  1 件のコメント
riad didou
riad didou 2020 年 7 月 2 日
編集済み: riad didou 2020 年 7 月 2 日
Error using regexp
The 'STRING' input must be either a char row vector, a cell array of char row vectors, or a string array.
Error in Untitled (line 6)
C = c(regexp(c, '\d*', 'match') == regexp(c1, '\d*', 'match'));

サインインしてコメントする。

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by