Borrar filtros
Borrar filtros

How to calculate total time required for (including preprocessing, conversion and prediction)per frame. Also how to convert all the images to greyscale for training and analysing .Then make the output to rgb image showing the correct prediction?

4 visualizaciones (últimos 30 días)
How to calculate total time required for (including preprocessing, conversion and prediction)per frame. Also how to convert all the images to greyscale for training and analysing and make the output to rgb image showing the correct prediction? I have uploaded the code for the same . Please help me as I have just started using matlab.

Respuesta aceptada

Utkarsh Belwal
Utkarsh Belwal el 24 de Ag. de 2020
You can use tic toc commands in MATLAB as follows,
tic
% Enter the code here for which time has to be measured
toc
Elapsed time will be shown in MATLAB terminal. See documentation for further information : Tic Toc
For rgb to grayscale conversion you can use rgb2gray
And for your last query, I don't think you can get RGB image from the grayscale as for the predicted image you do not have any information of colormap but as a workaround you can try the colormap of the original images and see the results. Look into the below MATLAB Answers for further understanding
DISCLAIMER: These are my own views and in no way depict those of MathWorks.
  3 comentarios
Utkarsh Belwal
Utkarsh Belwal el 25 de Ag. de 2020
Editada: Utkarsh Belwal el 25 de Ag. de 2020
For that you can store the colormap of each image before converting them to grayscale,
[I,colormap] = imread(___);
After you have got your results, using the stored color maps convert them back to rgb,
rgbImage = ind2rgb(grayImage, colormap);

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

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

Community Treasure Hunt

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

Start Hunting!

Translated by