There are three kinds of actuaries: those who can count, and those who can't.
Liutauras Vilda wrote:(...)
3. For the code readability you could assign rect.y+rect.height to something meaningful, the same also you could do with rect.x+rect.width.
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:
Liutauras Vilda wrote:(...)
3. For the code readability you could assign rect.y+rect.height to something meaningful, the same also you could do with rect.x+rect.width.
The code makes sense to me. What is it that makes it unclear to you?
Pallavi Vaish wrote:I need to select a particular portion of an image
There are three kinds of actuaries: those who can count, and those who can't.
Piet Souris wrote:hi Pallavi,
welcome!
what kind of image is this Gray_image? The method 'get(x,y)'
is unfamiliar to me.
Could it be that get(j, i) should be get(i, j)?
Pallavi Vaish wrote:
Piet Souris wrote:hi Pallavi,
welcome!
what kind of image is this Gray_image? The method 'get(x,y)'
is unfamiliar to me.
Could it be that get(j, i) should be get(i, j)?
Hello Piet,
Thank you.
Gray_image is that portion that I extracted from the original image. Here I have used .get(x,y) to access the pixels of the Gray_image. And it's get(j,i) not get(i,j) because the outer loop is for j. It's just the variable name so I don't think order here really matters. I wanna ask that am I doing correct for accessing pixel? Please tell the way if I'm wrong. Thank you.
There are three kinds of actuaries: those who can count, and those who can't.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |