[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Tiff function in Octave
From: |
Gabriele Ciccone |
Subject: |
Tiff function in Octave |
Date: |
Wed, 24 Jun 2020 11:27:44 +0200 |
Hi everybody,
I'm trying to convert a function I use in Matlab to merge a RGB image with a IR
image (both in JPG formats) and create a Tiff image with 4 bands (R, G, B, IR).
But I have some problem using Tiff function, 'cause looks like that Tiff
function is still not implemented in Octave.
Someone know how can I converte for Octave the Tiff part of following function?
for fidx = 1:numel(filelist1)
rgb = imread(fullfile(folder1, filelist1{fidx}));
numrows = size(rgb,1);
numcols = size(rgb,2);
ir = imread(fullfile(folder2, filelist2{fidx}));
data = cat(3,rgb,ir);
t = Tiff(fullfile(folderout, sprintf(outfilepattern, fidx))','w');
setTag(t,'Photometric',Tiff.Photometric.RGB);
setTag(t,'Compression',Tiff.Compression.None);
setTag(t,'BitsPerSample',8);
setTag(t,'SamplesPerPixel',4);
setTag(t,'SampleFormat',Tiff.SampleFormat.UInt);
setTag(t,'ExtraSamples',Tiff.ExtraSamples.Unspecified);
setTag(t,'ImageLength',numrows);
setTag(t,'ImageWidth',numcols);
setTag(t,'TileLength',32);
setTag(t,'TileWidth',32);
setTag(t,'PlanarConfiguration',Tiff.PlanarConfiguration.Chunky);
write(t,data);
close(t);
Thank you so much!!
GCiccone
- Tiff function in Octave,
Gabriele Ciccone <=