Effacer les filtres
Effacer les filtres

Converting Blob from an sqlite file to image

9 vues (au cours des 30 derniers jours)
Maria Jeseca Baculo
Maria Jeseca Baculo le 16 Jan 2023
The dataset that I am working on is saved as an sqlite file, when I fetch it in matlab, the value becomes a 1 dimensional uint8 data, how will I convert this to an RGB or Grayscale image?

Réponses (1)

Dhaniklal
Dhaniklal le 16 Jan 2023
I understand that you are trying to convert a blob from an sqlite database file to an image and you have managed to get the data from sqlite database file into a matlab single dimensional array of uint8. You can reshape the array using reshape function.
Example:
sampleArr = [1, 2, 3, 4, 5];
img = reshape(sampleArr, row, size, channels); % rows*cols must be equal to size of sampleArr
I am assuming that you know the size of the RGB image (height x width x 3) you want and possibly a single image.
For more information on reshape function please follow below link:
Thanks,
Dhaniklal

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by