Yebac
Yebac

Reputation: 21

Matlab - what kind of file am I dealing with?

I perform

q = load('filepath')

q = 

     groundtruth: [16x16 double]
    observations: [16x16 double]

What is q? Is it not a matrix?

This is a binary image, and I expected to see a matrix. In this particular problem, we are dealing with a true image(groundtruth) and a noisy obervation(observations). So I assume the file actually contains 2 binary images, but what is q? What am I getting, and how do I manipulate it?

Upvotes: 2

Views: 68

Answers (1)

Ghaul
Ghaul

Reputation: 3330

q is a structure array, containing both your images. To access/manipulate structures you use the notation "structure.field". So in your case, if you want to show the groundtruth image, just write

imshow(q.groundtruth)

Upvotes: 4

Related Questions