Hello Ed, thanks for your reply. That I trying to mean with 'reduce' is some of projection operation (op) like in PDL::Reduce module that performs "(op)over" to reduce to N-1 dimension after some operation over the set of (3,x,y, n) to (3,x,y) rgb images. I mean a composed rgb image from a set of (layer) n rgb images. For example:
$imn-> info : pdl D [3,nx,ny,n] $im=$imn->reduce('op',2); $im-> info : pdl D [3,nx,ny] Then, maybe I need to introduce some "sort" operation in order that when I reduce to one composed $im image each layer in $imn overlap the following layer. But, I did not realize how to do that using some pdl trick. Thanks a lot for your help Regards El jue, 24 oct 2024 a las 9:12, Ed . (<ej...@hotmail.com>) escribió: > Hi Guillermo, > > I believe the situation you're describing is you have effectively a series > of (3,x,y) images. You mention "reducing", but you haven't said what you > mean by that - would it turn that series of images into one image? > > wpic is intended to write out a single image, so an ndarray with multiple > images won't work with that. To write out a series of images as a movie you > could use wmpeg, or just to store the data you could use > https://metacpan.org/pod/PDL::IO::FastRaw and specifically writefraw. > Otherwise to write each image in its own file you could use something like: > > $_->wpic(sprintf "img%03d.png", $count++) for $pdl->dog; > > Does that help? > > Best regards, > Ed > ------------------------------ > *From:* Guillermo P. Ortiz <gor...@exa.unne.edu.ar> > *Sent:* 23 October 2024 4:42 PM > *To:* pdl-devel@lists.sourceforge.net <pdl-devel@lists.sourceforge.net>; > pdl-gene...@lists.sourceforge.net <pdl-gene...@lists.sourceforge.net> > *Subject:* [Pdl-devel] project ordered sequence image > > Hello everyone, > > I have created a pdl with structure (3,size_x,size_y,np) > in order to manage different layer features to compose an rgb > image. > > The idea that I can not connect yet is how to "reduce" over dim 3 > to project to 3 X s_x X s_y rgb image in ordered fashion sequence. For > example, > suppose that for np=0, 1 and 2, in the resulting image is only view of 2 > that > is allowed by 1 and 0 layers, in that order. > > I am trying to use wpic command from PDL::IO::Pic module > to convert via for example pnmtopng using options for it. > There are hashes like {FLAGS => options} used for options > {CONVERTER => 'pnmtopng'} indicating which conversor to use. > But is seems to be intended of rgb 3(4) X s_x X s_y > > Thanks for your attention in advance > > Regards > > > -- > > > Dr. Guillermo P. Ortiz > Electromagnetismo Aplicado > Dto. Física, Facultad de Ciencias Exactas > Universidad Nacional del Nordeste > Avda Libertad 5460, Campus UNNE. > W3404AAS Corrientes, Argentina. > (+54) 379-4424678 interno 4613 > gortiz* at *unne edu ar >
_______________________________________________ pdl-devel mailing list pdl-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pdl-devel