MATLAB: Extracting data from a text file.

annotations

Please help me with this code. Annotations.text contains the positions for five rectangles. How can I extract the values from text file and use it as position for rectangles.
I=imread('avengers.png');
Data = dlmread('Annotations.txt');
[rows, columns] = size(Data);
imshow(I);
rectangle('Position', 'Curvature',[0,0], 'LineWidth', 2, 'EdgeColor','r');

Best Answer

The question of plotting and colors was already answered in http://www.mathworks.com/matlabcentral/answers/170028#answer_164948. To answer your current question "How can I extract the values from text file and use it as position for rectangles?" it would be most helpful if you attached the data file and original image like Geoff asked. Make it easy for us to help you. If it's easy we might write code, otherwise we might just give written "directions."
Related Question