Jessime / Excision

Python 201. Applied Bioinformatics and Computational Biology
MIT License
2 stars 1 forks source link

level 5 #16

Open deanRHCP opened 7 years ago

deanRHCP commented 7 years ago

just to be clear, when you say "Next, mask the image by taking the arithmetic mean of the highest and lowest observed pixel values, then setting pixel values below that mean to zero." you mean the taking the max and min pixel values for the entire image? or for each 5x5 window?

Jessime commented 7 years ago

Yup, take the min and max pixel value for the entire image.

lafosse commented 7 years ago

More specifically, take the min and max pixel value for the entire image space (i.e. the single maximum value that exists across all images, and the single minimum value that exists across all images).

deanRHCP commented 7 years ago

Ummm I see. so it seems like when I do the median filter based on a 5x5 window using the following code, all my pixels become 0... grey = Image.open(image_path).convert('LA') grey = signal.medfilt(grey, kernel_size=5)

I tried to use a kernel_size = 3 and got non-zero pixels. any thoughts on this? is 5x5 too big?

On Sun, Jul 16, 2017 at 1:52 PM, Paul LaFosse notifications@github.com wrote:

More specifically, take the min and max pixel value for the entire image space (i.e. the single maximum value that exists across all images, and the single minimum value that exists across all images).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jessime/Excision/issues/16#issuecomment-315625297, or mute the thread https://github.com/notifications/unsubscribe-auth/AcLfkfi3e0de6bXenCneU76OTWr7wnyoks5sOk35gaJpZM4OZVJu .

-- Dean Nehama MD-PhD Candidate University of North Carolina - Chapel Hill B.S. Bioengineering, May 2009 Minor in chemistry, May 2009 University of California, Berkeley deanDN@gmail.com | 408-393-8351

lafosse commented 7 years ago

5x5 is what we are asking, so it shouldn't be too big. I'm not exactly sure of what the issue you're having with scipy.signal.medfilt is, but go ahead and try the function listed here in the documentation:

https://docs.scipy.org/doc/scipy/reference/generated/scipy.ndimage.median_filter.html#scipy.ndimage.median_filter

deanRHCP commented 7 years ago

Ok. I'll try that.

One more question. "Then, calculate the cumulative area (in microns) of the remaining object(s)."

I have a problem understanding conceptually what is being asked here. I know I have a bunch of images, each is 500x500. I'm pretty sure you are not asking us to multiply 500 by 500 two hundred times to find the area (right?). So what does it mean "remaining object(s)"?

On Sun, Jul 16, 2017 at 6:07 PM, Paul LaFosse notifications@github.com wrote:

5x5 is what we are asking, so it shouldn't be too big. I'm not exactly sure of what the issue you're having with scipy.signal.medfilt is, but go ahead and try the function listed here in the documentation:

https://docs.scipy.org/doc/scipy/reference/generated/ scipy.ndimage.median_filter.html#scipy.ndimage.median_filter

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Jessime/Excision/issues/16#issuecomment-315640747, or mute the thread https://github.com/notifications/unsubscribe-auth/AcLfkQPIku0nvNuaUM0iiLVlJJzvZssFks5sOomJgaJpZM4OZVJu .

-- Dean Nehama MD-PhD Candidate University of North Carolina - Chapel Hill B.S. Bioengineering, May 2009 Minor in chemistry, May 2009 University of California, Berkeley deanDN@gmail.com | 408-393-8351