필터 지우기
필터 지우기

How do i retrieve image based on its value in an excel file?

조회 수: 4 (최근 30일)
ahmed obaid
ahmed obaid 2017년 7월 24일
댓글: ahmed obaid 2017년 7월 26일
Dear Experiences...
i have an excel file.. in the following directory (D:\image_table).. where in this table there 100 x 100 matrix value look like the following, where the values refer to the degree of similarity among images (0..1), and images are store in folder (D:\images).. images names are (A1...A100).
A1 A2 A3 A4 A5 A6 .... A100
A1 1.0 0.25 0.33 ....
A2 0.25 1.0 ..................
A3
A4
..
..
A100
so, i need to retrieve all images names that satisfy condition like similarity>0.50 and also view all images from D:\images folder in category that match images names.. perhaps images name view as table.. thanks
excel file..
  댓글 수: 2
Image Analyst
Image Analyst 2017년 7월 24일
편집: Image Analyst 2017년 7월 24일
Where are the image names stored? Are they the row and column headers? Can you attach the workbook?
ahmed obaid
ahmed obaid 2017년 7월 25일
편집: ahmed obaid 2017년 7월 25일
yes, images name are row and column header... this table look like pairwise similarity table.. where image names are A1...A100

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2017년 7월 25일
Try this:
[rows, columns] = find(similarityMatrix > 0.5);
for k = 1 : length(rows)
fprintf('%s and %s have a similarity of %f.\n', ...
filenames(rows(k)), filenames(columns(k)), ...
similarityMatrix(rows(k), columns(k));
end
  댓글 수: 7
Image Analyst
Image Analyst 2017년 7월 26일
Let's say you have a random smattering of values in the array that are more than 0.5, so you have a bunch of image pairs. I'm not sure what you want. Do you want a wide image with the pair of images stitched side-by-side? Or above and below? Or something else? So if you had 5 numbers, you'd have 5 stitched image pairs? Please try to explain better. Attaching a desired output image would also be great.
ahmed obaid
ahmed obaid 2017년 7월 26일
Thank you for your time and explanation, when excel file import to matlab either by used readtable or import data, just imagine that first row contain A1 header (row_header), then if i read image using:
image=imread(D:\images\A1.png);
then by use [~, baseFileNName, ~]= fileparts(image.name);
we can know what is the name of reading image.. then suppose image name is A1, now im interesting just on first row.. where A1 have similarity values to all other images include A1, now we are check values of first row .. when value >=0.5 then result must shown (according to attached file) { A1, A3 and A5} as matched images.. then using path of my folder (D:\images) to view result images (A1, A3 and A5) in montage view or such other method...
perhaps this requirements can be applied... best regards.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by