Does af.regions work on 3D image input?

Open
#264 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start at the af.regions entry point and compare its documented 2D input description with the underlying ArrayFire af_regions behavior for 3D arrays. Verify the behavior with a minimal 3D input, then update the documentation to state the supported dimensionality and expected connectivity semantics.

Written by the indexing model from the issue text.

Description

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.

Parameters
----------
image : af.Array
      - A 2 D arrayfire array representing an image.

conn : optional: af.CONNECTIVITY. default: af.CONNECTIVITY.FOUR.
      - Specifies the connectivity of the pixels.

out_type : optional: af.Dtype. default: af.Dtype.f32.
      - Specifies the type for the output.

Returns
---------

output : af.Array
       - An array where each pixel is labeled with its component number.

"""
output = Array()
safe_call(backend.get().af_regions(c_pointer(output.arr), image.arr,
                                   conn.value, out_type.value))
return output`
Dominant language
Python
Stars
422
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arrayfire/arrayfire-python

All issues in arrayfire/arrayfire-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.