Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!c36g2000yqn.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: HOWTO: Accelerate processing algorithm
Date: Sun, 5 Jul 2009 11:15:41 -0700 (PDT)
Organization: http://groups.google.com
Lines: 19
Message-ID: <40939b49-f1d3-49bd-a0a6-46da4ac2bed1@c36g2000yqn.googlegroups.com>
References: <14646834.75779.1246802812202.JavaMail.jakarta@nitrogen.mathforum.org> 
	<1e37765c-af3c-49d8-8465-8203f0c78f19@d4g2000yqa.googlegroups.com> 
	<h2qith$ojj$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.12.181
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1246817741 9254 127.0.0.1 (5 Jul 2009 18:15:41 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sun, 5 Jul 2009 18:15:41 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: c36g2000yqn.googlegroups.com; posting-host=77.17.12.181; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
Bytes: 2127
Xref: news.mathworks.com comp.soft-sys.matlab:552908


On 5 Jul, 18:04, "Bruno Luong" <b.lu...@fogale.findmycountry> wrote:
> Rune,
>
> In short, ACCUMARRAY does for nd-array what SPARSE does for sparse matrix. It accumulates the vector elements (second input argument) depending on where they are located on a 'cell' (defined by the first input argument of subindexes).

So the OP's code essentially builds a histogram
from the images? If so, I tested a couple of variants
of building histograms some time ago:

http://groups.google.no/group/comp.soft-sys.matlab/msg/0b6492cb37b5d7fd?hl=no

If you do things 'properly', you can easily speed things
up a factor >10, using C++ instead of ACCUMARRAY.

If this is a 'naive' grey-scale histogram, things might
be simplified a lot more, with maybe another factor 5-10
faster.

Rune