フィルターのクリア

Problem loading proRAW (dng) file in matlab

7 ビュー (過去 30 日間)
Dian Bonestroo
Dian Bonestroo 2023 年 5 月 29 日
回答済み: Vandit 2023 年 6 月 30 日
I made some pictures in RAW mode on the Iphone 13 pro and now I want to load them in Matlab for further processing. The file is a 3d uint8 matrix, and I dont know how to convert it to a 2d matrix so that I can apply whitebalancing, blackleveling and other kalibrationsteps. Can someone help me with this problem?

回答 (1 件)

Vandit
Vandit 2023 年 6 月 30 日
Hi,
You may refer to the below steps in order to load a RAW image in MATLAB and convert a 3D uint8 matrix into a 2D matrix :
  • Download and install 'dcraw' on your system which decodes the RAW file and convert into standard 'TIFF' and 'PPM' image formats.
  • Use 'imread' function to load the PPM file as a 3D matrix using the below command :
rawImage = imread('your_raw_image_file.ppm');
  • Convert the obtained 3D image into a 2D matrix by converting it to grayscale using 'rgb2gray' function.
grayImage = rgb2gray(rawImage);
After converting to a 2D matrix, you can proceed with white balancing, black leveling, and other calibration steps using the grayscale image.
To know more about 'imread' and 'rgb2gray' functions, you may refer to the link below :
Hope this helps.
Thankyou

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by