How can I import .dng files using compression scheme 52546?
조회 수: 5 (최근 30일)
이전 댓글 표시
I am using this code to import .DNG raw images. However MATLAB doesn't seem to support 52546 compression. Any suggestion on how I can use these images in matlab without using external softwear?
clear; clc; close all;
%Example of reading and processing a Milky Way image I took with Matlab TIFF%
%By Fernando Zigunov 2020
f='20240213_191745.dng';
[RGB, I]=ReadDNG(f,'rggb');
RGB=RGB/(2^8); %Correct levels for 12-bit camera
imshow(RGB); %Shows image (only shiny stars appear)
%%
%=====Very simple image postprocessing, just to show what can be done======
%Image stretching (parameters manually selected)
RGBadjusted=imadjust(RGB,[0 0 0;0.02 0.04 0.016],[0 0 0;1 1 1],1.5);
%Denoising
W=5;
RGBadjusted(:,:,1)=wiener2(RGBadjusted(:,:,1),[W W]);
RGBadjusted(:,:,2)=wiener2(RGBadjusted(:,:,2),[W W]);
RGBadjusted(:,:,3)=wiener2(RGBadjusted(:,:,3),[W W]);
imshow(RGBadjusted)
댓글 수: 0
답변 (1개)
Austin M. Weber
2024년 2월 16일
I haven't worked with .dng images before, but I found a function called DNG2JPG on the MATLAB File Exchange that might be useful (see the link and/or the attached function file). As the name implies, it converts .dng files into the .jpg format, which is a much more accessible file type.
Hopefully this helps.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!