Proposes a 3-D Hopfield neural network called Contextual-Constraint Based Hopfield Neural Cube (CCBHNC) taking both each single pixel's feature and its surrounding contextual information for image segmentation, mimicking a high-level vision system. Different from other neural networks, CCBHNC extends the two-dimensional Hopfield neural network into a three-dimensional Hopfield neural cube for it to easily take each pixel's surrounding contextual information into its network operation. As CCBHNC uses a high-level image segmentation model, disconnected fractions arising in the course of tiny details or noises will be effectively removed. Furthermore, the CCBHNC follows the competitive learning rule to update the neuron states, thus precluding the necessity of determining the values for the hard constraints in the energy function, which is usually required in a Hopfield neural network, and facilitating the energy function to converge fast. The simulation results indicate that CCBHNC can produce more continued, more intact, and smoother images in comparison with the other methods.