How to read images from firebase?

조회 수: 2 (최근 30일)
Zainab Riyadh
Zainab Riyadh 2023년 5월 5일
답변: Sachin 2023년 5월 8일
I have captured images using rasberry pi and uploaded these images to firebase. Now I need MATLAB to read the images from firebase so I can classify them using a pre-trained model I have developed.
  댓글 수: 1
Constantino Carlos Reyes-Aldasoro
If you have a url, you can read directly with imread
a = imread('https://upload.wikimedia.org/wikipedia/commons/3/3a/Grand_Palace_of_Bangkok_1860s.jpg');
imagesc(a); colormap gray

댓글을 달려면 로그인하십시오.

답변 (1개)

Sachin
Sachin 2023년 5월 8일
Hi
I understand that you want to read images from firebase database using MATLAB.
You can try any one of the following workarounds:
  1. As you can execute the Python code within the MATLAB IDE, I recommend using the firebase python client to access the data. Once the data is retrieved ,you can then process it as needed .
  2. Refer this page - python - how to show image after fetching from firebase - Stack Overflow
  3. Another method is to use firebase REST API to send a GET request to the firebase realtime url.
Here are some general steps to follow:
  1. Get the firebase realtime url.
  2. Add “.json” to the end of the url
  3. Use “webread” function in MATLAB to access the data.
  4. Parse the json string using “jsondecode” function.
Refer the firebase documentation for more information
Hope this helps you

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by