how to save scatter plot of each row as image for image classification

4 visualizaciones (últimos 30 días)
Med Future
Med Future el 4 de Mzo. de 2022
Comentada: Med Future el 10 de Mzo. de 2022
Hello Everyone, I hope you are doing well.
i have the following data of shape 100x1000.
each row has 1000 samples
i want save scatter plot of each row as image to train image classification network How can i do that?
  6 comentarios
Image Analyst
Image Analyst el 9 de Mzo. de 2022
OK, explain what I'm looking at here. How does this data relate to images? Why is the value the same for all columns and what does the value mean? What do the rows and columns represent? Is a column for each image, and the rows are the vector of values that you'd like to predict for each image? Probably not since all columns are the same so the predicted value would not change if you changed the image.
s = load('saveddata.mat')
data = s.fixedclass;
subplot(2, 1, 1);
imshow(data, []);
impixelinfo;
title('Data in Mat file')
subplot(2, 1, 2);
plot(data(:, 1), 'b.-', 'LineWidth', 2);
grid on;
title('First Column')
xlabel('Row');
ylabel('Value')
Med Future
Med Future el 9 de Mzo. de 2022
@Image Analyst Each row has constant value , means it belongs to one class

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 4 de Mzo. de 2022
load('saveddata.mat') ;
for i = 1:100
plot(fixedclass(i,:),'.')
drawnow
filename = [num2str(fixedclass(i,1)),'.png'] ;
saveas(gcf,filename)
end
  15 comentarios
KSSV
KSSV el 10 de Mzo. de 2022
I am confused and not clear what problem you faced and what you are expecting.
Med Future
Med Future el 10 de Mzo. de 2022
@KSSV the code you share some image has brighter line and some has dark line

Iniciar sesión para comentar.

Categorías

Más información sobre Image Data Workflows en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by