Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #11814 > unrolled thread

Problem with Map & For Loop !

Started bycharitonick@gmail.com
First post2012-09-19 08:57 +0000
Last post2012-09-19 08:57 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Problem with Map & For Loop ! charitonick@gmail.com - 2012-09-19 08:57 +0000

#11814 — Problem with Map & For Loop !

Fromcharitonick@gmail.com
Date2012-09-19 08:57 +0000
SubjectProblem with Map & For Loop !
Message-ID<k3c1em$f00$1@smc.vnet.net>
Dear Mathematica Users & Developers,

First of all thank you a priori for your help.

I have a "Strange" problem with a For loop and Image Manipulation, into which I would very much appreciate your help.

SetDirectory["C:\\Something\\images"] ; (*is the directory of my images, about 1000 images in there*)

names = FileNames["*.tif"];
images = Map[Import, names];

(*The problem now is that I want to take from all the picture, the same pixel value, and I want to do that for several pixels. More specifically for Y pixels from 0 to 302. So: *)

PixX = {5, 5};
b=0;
While [b < 302, PixY = Table[{10, b}, {b, 302}]; b++;] (*In order to fill a table with the Y pixels that I want to take their values*)

Next I thought a FOR loop: 

For[i < 302, i++, Map[ImageTake[#, PixY[[i]], PixX] &, images]]

My problem is that, Mathematica gives *no output* to that command, and I really don't know how, and if I can, assign a different name to the output of this command each time, in order to use afterwards ImageData[name] and take the pixel values each time. 

Am I thinking something wrong?
Sincerely yours,
Nikos


[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web