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?
1 回表示 (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
Utkarsh Belwal
2020 年 8 月 24 日
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 件のコメント
Utkarsh Belwal
2020 年 8 月 25 日
編集済み: Utkarsh Belwal
2020 年 8 月 25 日
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);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Image Data Workflows についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!