Image processing apparatus, non-transitory computer-readable recording medium having stored therein image processing program, and operation method of image processing apparatus
When binary labeling is performed, an outline specification unit specifies a first outline present toward a target region and a second outline present toward a non-target region, and which have shapes similar to an outline of the target region. A voxel selection unit selects an N number of voxels constituting all of the first outline and the second outline. The energy setting unit sets N-order energy when a condition that all of the voxels of the first outline belong to the target region and all of the voxels of the second outline belong to the non-target region is satisfied smaller than the N-order energy when the condition is not satisfied. After then, labeling is performed by minimizing energy.