How to read '.webp' image file

45 vues (au cours des 30 derniers jours)
Salad Box
Salad Box le 15 Jan 2023
Commenté : Image Analyst le 13 Juin 2023
Hi,
I have a couple of image files in '.webp' format, how to read them in Matlab?

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 15 Jan 2023
Modifié(e) : KALYAN ACHARJYA le 15 Jan 2023
This option!
Save in the web & you can try using complete web path
Reference : Link
HTH
  2 commentaires
Image Analyst
Image Analyst le 16 Jan 2023
I don't understand. That question seems to only talk about .JPG images on the web. How would any of that work for .webp format images and get them into a variable in MATLAB?

Connectez-vous pour commenter.

Plus de réponses (1)

Image Analyst
Image Analyst le 16 Jan 2023
Try this. Adapt as needed:
% If you enter this address
% 'https://i0.wp.com/www.bitsandpieces.us/wp-content/uploads/2023/01/unnamed-15.png?resize=600%2C334&ssl=1');
% If, in your browser, you right click, it will ask you to save the image as a .webp format file.
% But what you really want is a variable in MATLAB and from there you can save it as any file format you want.
imageURL = 'https://i0.wp.com/www.bitsandpieces.us/wp-content/uploads/2023/01/unnamed-15.png?resize=600%2C334&ssl=1';
[indexedImage, cmap] = imread(imageURL);
rgbImage = ind2rgb(indexedImage, cmap);
imshow(rgbImage);
% imwrite(rgbImage, 'Mistakes.png')
  2 commentaires
Image Analyst
Image Analyst le 13 Juin 2023
@Sven I have no idea. I know little about .webp or even why people use that instead of the original format. I didn't even know about Google's webpd.exe until you told me about it. Ask tech support if there is some better way to read .webp files.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by