-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does af.regions work on 3D image input? #264
Comments
Yes that's right. Here's the assertion that limits the input to 2d (https://github.com/arrayfire/arrayfire/blob/4061db86e66306995175a14cf906c55c35373918/src/api/c/confidence_connected.cpp#L209) |
@syurkevi I was actually looking to find connected components in a 3D volume structure. I got the sense that at least some of the other methods work on 3d structures but I want to make sure. Actually I came across this library after working with SimpleITK, which does work on 3D structures but I found the performance to be quite slow. Do you think ArrayFire could be a potentially suitable alternative if I am looking for something more performant? OpenCV can be pretty performant for 2D image processing but lacks a more comprehensive 3D processing capability. SimpleITK has 3D capability but its libraries are written to be used more generally and are not so performant from my experience. I was hoping ArrayFire would be my solution. |
We do have some support for 3d functions such as JIT functions, convolutions, FFT, however many of our computer vision and image processing functions focus on 2d and batch processing. Higher level indexing for implementing the kinds of operations you are interested should work from a functional perspective, but i think they may be better suited for a custom kernel (which can be done through our interop functions in the c++ backend) if performance is the critical consideration. |
From the documentation it appears as though the method is designed to work in 2D only:
`def regions(image, conn = CONNECTIVITY.FOUR, out_type = Dtype.f32):
"""
Find the connected components in the image.
The text was updated successfully, but these errors were encountered: