Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

error "Subscript indices must either be real positive integers or logicals" in 2D dual tree DWT plot code.

1 visualizzazione (ultimi 30 giorni)
When I run the code for 2D dual tree DWT for my image size 173x144 I get an error "Subscript indices must either be real positive integers or logicals" . should I change the size of my image?
My coding is
clc;
clear all;
close all;
J = 4;
L = 3*2^(J+1);
N = L/2^J;
[Faf, Fsf] = FSfarras;
[af, sf] = dualfilt1;
x=imread('my_segmented.jpg');
x=rgb2gray(x);
x=im2double(x);
% x = zeros(2*L,3*L);
w = dualtree2D(x, J, Faf, af);
w{J}{1}{1}(N/2,N/2+0*N) = 1;
w{J}{1}{2}(N/2,N/2+1*N) = 1;
w{J}{1}{3}(N/2,N/2+2*N) = 1;
w{J}{2}{1}(N/2+N,N/2+0*N) = 1;
w{J}{2}{2}(N/2+N,N/2+1*N) = 1;
w{J}{2}{3}(N/2+N,N/2+2*N) = 1;
y = idualtree2D(w, J, Fsf, sf);
figure(1)
clf
imagesc(y);
axis equal
axis off
colormap(gray(128))

Risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by