Combine planar sensor images into full Bayer pattern CFA
Combine Sensor Data into Complete CFA Image
Read RAW image data into the workspace.
cfa = rawread("colorCheckerTestImage.NEF");
Create an image with individual channels for each sensor in the CFA image.
rggb = raw2planar(cfa);
Convert the image with separate channels for each sensor into a complete CFA image.
cfaFull = planar2raw(rggb);
I — Image with channel for each sensor element
M-by-N-by-4 numeric array
Image with a channel for each sensor element, specified as an M-by-N-by-4 numeric array.
cfa — CFA image
(2*M)-by-(2*N) numeric matrix
CFA image, returned as a (2*M)-by-(2*N)
numeric matrix of the same class as
planar2raw constructs the CFA image by placing
I(:,:,1) starting at
I(:,:,2) starting at
I(:,:,3) starting at
cfa(2,1), and placing
I(:,:,4) starting at
Run code in the background using MATLAB®
backgroundPool or accelerate code with Parallel Computing Toolbox™
This function fully supports thread-based environments. For more information, see Run MATLAB Functions in Thread-Based Environment.
Version HistoryIntroduced in R2021a
R2022b: Support for thread-based environments
planar2raw now supports thread-based