[scikit-image] 回复:Re: my fast watershed has pass all the test_watershed check

imagepy at sina.com imagepy at sina.com
Fri Dec 1 20:47:26 EST 2017


Hi Jaime:All my test are in the following format:
def test_watershed01():    data = np.array(..., np.uint8)    markers = np.array(..., np.uint16)    out1 = mywatershed(data, markers)    out2 = skwatershed(data, markers)    print(np.sum(out1-out2!=0))
every test gets a zero output, but the parameter has little diffrence with skimage.1. the image should be uint8 (then region can growing one level in one step)2. the markers should be uint16 (I change -1 of the orignal test into 1, we just need to make sure the marker order)3. connectivity only accept 1 or 2. means 4-connect or 8 connect.(6-connect, 28-connect for 3d)
for the float image, I think we can do a histogram normalrize. this means take full use of the range.then scale into 0-255, if nessesary, scale into 0-65536, then my watershed can process it.
"Connectivity dimension must be same as image" I think it is generated by scikit-image, which version  do you use?
BestYXDragon----- 原始邮件 -----
发件人:Jaime Lopez Carvajal <jalopcar at gmail.com>
收件人:imagepy at sina.com,  "Mailing list for scikit-image (http://scikit-image.org)" <scikit-image at python.org>
主题:Re: [scikit-image] my fast watershed has pass all the test_watershed check
日期:2017年12月02日 05点47分

Hi YXDragon,
The majority of tests, except 1,3,9,11, generates this error: Connectivity dimension must be same as image
Do you think, I have an older version of skimage? or could it be another thing?
Jaime



On Wed, Nov 29, 2017 at 2:03 PM,  <imagepy at sina.com> wrote:
Hi Everyone:I had implemented a watershed by numba, and now it has pass all the test_watershed check and got a exactly same result with skimage, support watershed-line, support connectivity, (pass test 0-12, but mine did not support compact yet)
It support nd, now only support uint8 image with uint16 marks. (because I think sometimes it is enough, It can process float image if it is needed)
And it is very smart and fast. less than 100 lines, and faster than skimage one. a 3d image which skimage run more than 10 minutes ( and I cannot wait any longer, so kill it), but my watershed just need 28 s.
The code are attached. 
BestYXDragon
_______________________________________________

scikit-image mailing list

scikit-image at python.org

https://mail.python.org/mailman/listinfo/scikit-image




-- 
Jaime Lopez Carvajal



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20171202/76454df2/attachment-0001.html>


More information about the scikit-image mailing list