that's awesome, it works like a charm, thank you very much also, do you see any need on using the 'data' function (from image.jl: returns a reference to the array data in the image. It allows you to use an algorithm written for Arrays or AbstractArrays on Image types.) to extract data of an image to an array, or is it the same as making a copy of it to further manipulation?
thanks a lot, On Monday, November 23, 2015 at 7:06:20 PM UTC-3, Tom Breloff wrote: > > When you do "dmode = excm", you're only binding the variable name "dmode" > to the reference "excm". They point to the same underlying object. You > could try "dmode = copy(excm)" > > On Mon, Nov 23, 2015 at 4:38 PM, Fliprl Data <[email protected] > <javascript:>> wrote: > >> >> >> I'm a newbie in Julia, I really appreciate if you could help me on this. >> >> I had issues when using piece of code below. Apparently, the original >> variable (excm) is changed, so when I type ImageView.view(excm) before and >> after the routine, it is changed, but I'm only manipulating a copy of it >> (dmode). I have a similar issue when copying properties of one image to >> another. >> >> ImageView.view(excm) >> dmode = excm; >> for i in 2:206 >> for j in 2:206 >> surr = length(dmode[i-1:i+1,j-1:j+1] .< 0.2) >> if surr > 4 dmode[i,j] = 0 end >> end >> end >> ImageView.view(excm) >> >> note: once I ran the code ImageView.view(excm) shows me a modified >> version of excm, even if I'm modifying dmode only. >> >> How can I create copies of the image without changing the original, I >> guess I don't know how to assign it. >> >> thanks a lot, >> > >
