Borrar filtros
Borrar filtros

Converting Blob from an sqlite file to image

9 visualizaciones (últimos 30 días)
Maria Jeseca Baculo
Maria Jeseca Baculo el 16 de En. de 2023
Respondida: Dhaniklal el 16 de En. de 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?

Respuestas (1)

Dhaniklal
Dhaniklal el 16 de En. de 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

Categorías

Más información sobre Convert Image Type 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