A novel physics-inspired method for image region segmentation by imitating the carrier immigration in semiconductor materials

A novel method for image region segmentation is proposed, which is inspired by the carrier immigration mechanism in semiconductor materials. The carrier diffusing and drifting are simulated in the proposed model, and the sign distribution of net carrier at the model’s balance state is exploited for region segmentation. The experiments have been done for test images and real world images, which prove the effectiveness of the proposed method.


Introduction
Self balancing is a mechanism existing in many natural systems.For example, the formation of the P-N junction in semiconductor materials is the result of balancing of the diffusing and drifting process of carriers.The physical P-N junction, the charge carriers in P-type and N-type semiconductor are holes and electrons respectively [1,2].When the materials of the two are put together with compact contact, diffusion of carries will happen at the interface of contact due to carrier density difference (i.e. carrier moving from high-density side to low density side).Meanwhile, a space charge region is established.It in turn causes the drifting of carriers which is at the opposite direction of diffusing.The above process will reach a balance state [1,2].In the self balancing mechanism shown in Figure .1, the system's state at new balancing point may depend on the external influence (such as the external voltage applied onto the P-N junction).This mechanism may be the inspiration of novel methods for problem solving, if the self balancing mechanism suits the nature of the problem well.Image segmentation is a fundamental problem in image processing, which has significant value in both theoretic and practical research [3][4][5].The basis of differentiation of two adjacent regions is their difference of image characteristics.It is still an on-going and open research topic to segment image regions for various practical purposes [3][4][5][6][7].In recent years, nature-inspired methods have attracted more and more research attention, in which the mechanisms in nature are imitated and adjusted in novel algorithms for image segmentation, and promising results have been obtained in such preliminary works [8,9].In this paper, inspired by the physical P-N junction, the self-balancing mechanism of carrier diffusing and drifting is adopted in a novel segmentation framework, in which the region structure of image is formed by dynamic carrier diffusing and drifting.In the algorithm, the virtual electric field is defined artificially according to greyscale difference between adjacent image pixels, which introduces the factor of greyscale difference for segmentation.

The model of virtual carrier immigration in digital images
The proposed model for image segmentation is as follows.Two categories of virtual carriers are defined: positive and negative, which imitates the physical electron and hole.Each pixel is modelled as a container of virtual carriers.Each pixel has four adjacent pixels (except those on image borders), and correspondingly each carrier container has four adjacent containers.There is an interface between each pair of adjacent containers.
There are two features of the interface mentioned above.Firstly, the interface has permeability, which means the carriers at both sides of the surface can diffuse through it due to density difference.Secondly, there is a virtual electric field imposed on it, whose direction and intensity are determined by the greyscale difference between the corresponding two pixels connected by that interface.The virtual electric field is defined as: where e is the intensity of virtual electric field at the interface, K is a predefined positive coefficient, g is the greyscale of the pixel of interest and g a is that of its adjacent pixel.The effect of each virtual electric field is limited to its corresponding interface only, and does not influence other interfaces.In such a way, the model is established consisting of virtual carrier containers and their interfaces, the virtual electric field, and also the virtual carriers.The evolution of the system is analyzed as follows.Initially, suppose the positive and negative carriers are of the same quantity, and each container has the same amount of carriers.Also suppose all the containers have the same volume, so that the density of carrier in a container is proportional to the amount of carrier in it.Therefore, there is no density difference of carriers between adjacent containers at that time.In another word, there is no carrier diffusion at the beginning.However, due to the virtual electric field at each interface, the positive and negative carriers drift across the interfaces due to the virtual force applied by the electric field.The drifting then causes carrier density difference between two sides of the interface, which in turn makes the carriers to diffuse due to that density difference.Obviously, the diffusion has the opposite effect of drifting.For each interface and each container, such dynamic process evolves until a balance between drifting and diffusion is reached.

Image segmentation based on virtual carrier immigration 3.1 Model implementation by computer simulation
In the simulation of the model on computer, the simulation must be implemented in discrete steps (i.e.iteration by iteration).In one simulation step, the drifting speed of carrier (i.e. the amount of carrier immigrating from one container to the other in an iteration of simulation, or one simulation step) is defined directly proportional to the intensity of virtual electric field: where ǻc drifting is the amount of carrier drifting from one container into the other, K 1 ' is a predefined positive coefficient, e is the intensity of virtual electric field at the interface.According to Equation (1), ǻc drifting is also proportional to the greyscale difference between the adjacent pixels: 1 ( ) where ǻc drifting is the amount of carrier drifting from one container into the other, K 1 is a predefined positive coefficient, g is the greyscale of the pixel of interest and g a is that of its adjacent pixel.
On the other hand, in one simulation step, the speed of diffusion has proportionality relationship with carrier density difference between the adjacent pixels.Suppose each container has the same size (or volume).Then the carrier density is proportional to the carrier amount in each container.Therefore, in the implementation the carrier density is substituted by carrier amount for diffusing: 2 ( ) where ǻc diffusing is the amount of carrier diffusing from one container into the other, K 2 is a predefined positive coefficient, c is the net carrier amount in the container of interest and c a is that in its adjacent container.There are two types of carriers in the model: positive and negative.Each container has both types in it.In the evolving process, the two types of carrier immigrate by drifting and diffusing respectively.For each container, the net carrier is the combination of the two types after the offset between them.For simplicity in implementation, the immigration of carriers is measured by the amount of net carrier.In another word, the carrier density and the flow of carrier between containers are measured by net carrier amount.
The process of implementing the model is as follows.At the beginning, the amounts of positive and negative carriers are equal in each container.Also suppose the amount is sufficient for arbitrary amount of carrier immigration in the simulation.Then the virtual electric field is calculated at each interface between adjacent containers, which is proportional to the greyscale difference between corresponding adjacent pixels.The detailed simulation step is as follows: Step1 For each of the four interfaces of every virtual container (or pixel), do the following: calculate the drifting amount of carrier due to virtual electric field; calculate the diffusing amount of carrier due to carrier density difference; sum the above two for all the 4 interfaces of a container to get its total change of net carrier amount; update the net carrier amount in that container; Step2 After all the containers update their net carrier amount, calculate the average change of net carrier for all the containers.If the average change of net carrier is smaller than a predefined threshold, it is close enough to the balance state, and the simulation stops; otherwise, return to Step1 to begin a new iteration of simulation.The above interesting results for test images can be analyzed as follows.At region borders with large greyscale variation, the dominant factor of carrier immigration is the drifting caused by the strong virtual electric field.As the overall effect, for a pair of containers, the positive carriers tend to gather into one container, while the negative carriers gather into the other.Such effect will increase the difference of net carrier amount between the adjacent containers, and the sign of the net carriers in them also tend to become opposite.

Simulation results for simple test images
On the other hand, for a local area within a region, the greyscale difference is small.Correspondingly, the virtual electric field is also small.Here the dominant factor for carrier immigration is the density difference of carriers between adjacent containers.As the result, the amount and sign of net carrier for the containers inside a region tend to become homogeneous.Therefore, the global distribution of the sign of net carriers at balance state can provide effective basis for image segmentation.

Image segmentation based on the proposed model for real world images
In the above experimental results for the test images, it is shown that the sign of net carrier are opposite in two adjacent regions, which can provide the basis of region division in images.In order to obtain the segmentation result from the sign distribution of the net carrier, a region grouping approach is proposed as following: Step1: Implement the simulation of the virtual carrier immigration as proposed in section 4.1; Step2: Obtain the sign distribution of the net carrier; Step3: Group the adjacent containers (i.e.image points) with the same sign of net carrier as connected points in same region.In the region grouping process, the adjacent pixels of the 4-connection (i.e. the upper, lower, left and right pixels) for an image point p is investigated.However, real world images are more complex.To investigate the effect of the proposed method, experiments are carried out for a series of real world images.For demonstration, an example of the results is shown in Figure .5, which is for the medical heart image.The experimental results indicate that the proposed method can obtain large amount of regions (more than a hundred).There are 533 for the medical heart image.To obtain practically useful segmentation result, a region merging method is proposed based on the gray-scale similarity of adjacent regions.Given an expected number of remaining regions after merging, the following steps are carried out to merge regions: Step1: Calculate its average gray-scale value for each region.
Step2: Find the pair of neighboring regions with the least difference of the average gray-scale, and merge them into one region.
Step3: If current region number is larger than the expected number, return to Step1; otherwise, stop the merging.
In Figure 5, the following results show the original image, the sign distribution of net carrier at the balance state, the region segmentation results by grouping, and also the result of region merging.In the sign distribution of net carrier, the white points represent positive net carrier, and black points represent negative net carrier.In the region segmentation results and region merging results, different regions are represented by different greyscale values.For the medical image of the heart, the remained region number after merging is 50 in Figure .5(d).Figure.5(d) shows the heart structure clearly.Moreover, the average of the net carrier change for all the points is calculated and recorded as a measurement of the convergence degree to the balance state.Figure .6 shows the relationship between that average value and the simulation time, which indicates that the process of carrier immigration approaches the balance state with the simulation going on.The experimental results prove that the proposed method is effective in segmentation of real world images.

Conclusion
A novel model of virtual carrier immigration is presented by imitating the diffusing and drifting of carriers in physical P-N junction.The virtual electric field between adjacent pixels is defined according to their greyscale difference, which is the major difference between the proposed model and real P-N junction.The direct local interaction and indirect global interaction of the above two carrier movements can lead to a balance state of carrier distribution, which provides clues for region segmentation.Image segmentation is implemented based on the sign distribution of net carrier at balance state, and a merging step is applied to get more comprehensible and useful segmentation results.The experimental results for test images and real world images prove the effectiveness of the proposed method.
For future improvement of the segmentation results, color and texture feature will also be introduced into segmentation for possible improvement.

Figure. 2
shows the details of carrier immigration between two adjacent containers, while Figure.3 shows the overall structure of the model on digital image.The balance state is worth of study for possible use in image segmentation, and difference of the proposed algorithm and the physical process can also be clearly seen as above.

Fig. 2 .
Fig. 2. Two adjacent containers in the proposed model of carrier immigration in digital images.

Fig. 3 .
Fig. 3.The structure of the proposed model upon digital image.
An example of the experimental results for test images is shown in Figure.4. The simulation is implemented by programming in C. Figure.4(a) shows a test image with a rectangle region.In order to demonstrate the process of carrier immigration step by step, the intermediate results at several specific simulation step numbers are recorded together with the final result.The intermediate results are shown from Figure.4(b) to Figure.4(f), where the white and black points represent the positive and negative sign of net carrier respectively, and the gray points represent that the net carrier is zero (i.e.not a definite sign yet).From Figure.4(b) to Figure.4(f), it is clear that the positive sign part expands inward, while the negative sign part expands outward from the rectangle border with increasing simulation time.The final result of net carrier distribution in Figure.4(g) can provide a definite segmentation of Test image 1.

Fig. 4 .
Fig. 4. The simulation results for one test image.

Fig. 5 .
Fig. 5.The experimental results for the medical heart image.

Fig. 6 .
Fig. 6.The relationship between the average change of net carrier and the simulation time (for the medical heart image).