Thread Subject: Image block processing

Subject: Image block processing

From: Jeremy Wells

Date: 25 Jun, 2008 23:33:02

Message: 1 of 4

I am trying to place a variable into an embedded matlab
block within a block processing module, to allow me to
modify the amount of compression that I can apply to each
block. I keep getting an error "size of index expression
no statically known". As the size of the array will depend
on teh amount of compression that I apply. Is there any
way around this?

Subject: Image block processing

From: ImageAnalyst

Date: 26 Jun, 2008 00:14:38

Message: 2 of 4

On Jun 25, 7:33=A0pm, "Jeremy Wells" <jrwe...@qinetiq.com.au> wrote:
> I am trying to place a variable into an embedded matlab
> block within a block processing module, to allow me to
> modify the amount of compression that I can apply to each
> block. =A0I keep getting an error "size of index expression
> no statically known". =A0As the size of the array will depend
> on teh amount of compression that I apply. =A0Is there any
> way around this?
---------------------------------------------------------------------------=
---
Jeremy:
Can you give the actual error message? (Seems doubtful that The
Mathworks would give such a grammatically incorrect message but I
guess it's possible, so I was wondering if you could actually do a
copy and paste this time). Can you give a traceback of the error
messages as listed in the command window (again, via copy & paste),
because I have no idea what function generated the error? Also, what
do you mean by "block"? Do you mean a block of code, like an "if"
block, or a block of the image (a sub-rectangle) so that you're going
to process the image in a block-wise fashion like is sometimes done
(for example in locally adaptive histogram equalization)?
Regards,
ImageAnalyst

Subject: Image block processing

From: Jeremy Wells

Date: 26 Jun, 2008 00:40:20

Message: 3 of 4

ImageAnalyst <imageanalyst@mailinator.com> wrote in message
<ccae6d11-a2f0-41ee-9537-
ac058db902f1@f36g2000hsa.googlegroups.com>...
> On Jun 25, 7:33=A0pm, "Jeremy Wells"
<jrwe...@qinetiq.com.au> wrote:
> > I am trying to place a variable into an embedded matlab
> > block within a block processing module, to allow me to
> > modify the amount of compression that I can apply to
each
> > block. =A0I keep getting an error "size of index
expression
> > no statically known". =A0As the size of the array will
depend
> > on teh amount of compression that I apply. =A0Is there
any
> > way around this?
> ----------------------------------------------------------
-----------------=
> ---
> Jeremy:
> Can you give the actual error message? (Seems doubtful
that The
> Mathworks would give such a grammatically incorrect
message but I
> guess it's possible, so I was wondering if you could
actually do a
> copy and paste this time). Can you give a traceback of
the error
> messages as listed in the command window (again, via copy
& paste),
> because I have no idea what function generated the
error? Also, what
> do you mean by "block"? Do you mean a block of code,
like an "if"
> block, or a block of the image (a sub-rectangle) so that
you're going
> to process the image in a block-wise fashion like is
sometimes done
> (for example in locally adaptive histogram equalization)?
> Regards,
> ImageAnalyst

Here are the messages, cut and pasted. The second part
refers to the array that I am trying to modify with the
variable "zig_zag_length_m". I am using the Block
Processing functinality under Utilities in the Video and
Image Processing Blocksets. So it is block as in sub-
rectangle of an image

Error mesage:

Size of index expression is not statically known.

Function 'Encoder2/Block Processing/Block iterator/sub-
block process/Transform coder/Embedded MATLAB Function'
(#37.3334.3352), line 107, column 7:
"1:zig_zag_length_m"

Command window error messages:

??? Error using ==> sf
Errors occurred during parsing of Embedded MATLAB
function 'Encoder2/Block
Processing/Block iterator/sub-block process/Transform
coder/Embedded
MATLAB Function'(#37)



Subject: Image block processing

From: Fred Smith

Date: 26 Jun, 2008 18:01:35

Message: 4 of 4


Hi Jeremy,

Embedded MATLAB does not support matrices of dynamically changing size.
This means that Embedded MATLAB must be able to figure out the size of the
expression "1:zig_zag_length_m". The only way it can do that is if
zig_zag_length is a constant. You can make it constant by supplying it as a
non-tunable parameter, or simply by defining it as a constant in your
function:
    zig_zag_length = 3;

Hope this helps,

Fred


"Jeremy Wells" <jrwells@qinetiq.com.au> wrote in message
news:g3uohk$s2f$1@fred.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <ccae6d11-a2f0-41ee-9537-
> ac058db902f1@f36g2000hsa.googlegroups.com>...
>> On Jun 25, 7:33=A0pm, "Jeremy Wells"
> <jrwe...@qinetiq.com.au> wrote:
>> > I am trying to place a variable into an embedded matlab
>> > block within a block processing module, to allow me to
>> > modify the amount of compression that I can apply to
> each
>> > block. =A0I keep getting an error "size of index
> expression
>> > no statically known". =A0As the size of the array will
> depend
>> > on teh amount of compression that I apply. =A0Is there
> any
>> > way around this?
>> ----------------------------------------------------------
> -----------------=
>> ---
>> Jeremy:
>> Can you give the actual error message? (Seems doubtful
> that The
>> Mathworks would give such a grammatically incorrect
> message but I
>> guess it's possible, so I was wondering if you could
> actually do a
>> copy and paste this time). Can you give a traceback of
> the error
>> messages as listed in the command window (again, via copy
> & paste),
>> because I have no idea what function generated the
> error? Also, what
>> do you mean by "block"? Do you mean a block of code,
> like an "if"
>> block, or a block of the image (a sub-rectangle) so that
> you're going
>> to process the image in a block-wise fashion like is
> sometimes done
>> (for example in locally adaptive histogram equalization)?
>> Regards,
>> ImageAnalyst
>
> Here are the messages, cut and pasted. The second part
> refers to the array that I am trying to modify with the
> variable "zig_zag_length_m". I am using the Block
> Processing functinality under Utilities in the Video and
> Image Processing Blocksets. So it is block as in sub-
> rectangle of an image
>
> Error mesage:
>
> Size of index expression is not statically known.
>
> Function 'Encoder2/Block Processing/Block iterator/sub-
> block process/Transform coder/Embedded MATLAB Function'
> (#37.3334.3352), line 107, column 7:
> "1:zig_zag_length_m"
>
> Command window error messages:
>
> ??? Error using ==> sf
> Errors occurred during parsing of Embedded MATLAB
> function 'Encoder2/Block
> Processing/Block iterator/sub-block process/Transform
> coder/Embedded
> MATLAB Function'(#37)
>
>
>


Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com