A reasoning system for image analysis

For image analysis in computer, the traditional approach is extracting and transcoding features after image segmentation. However, in this paper, we present a different way to analyze image. We adopt spatial logic technology to establish a reasoning system with corresponding semantic model, and prove its soundness and completeness, and then realize the image analysis in formal way. And it can be applied in artificial intelligence. This is a new attempt and also a challenging approach.


Introduction
The emergence of the digital image analysis technology and its development is only a few decades.But it has deep into our life, such as, artificial intelligence [1], military [2], medical science [3] and other fields [4], and become our main production tools and modern life tools [5,6].By the current conventional methods, the image analysis based on computer is usually done with the following procedures: input high quality image, image segmentation, feature extraction, converting features into quantitative expression, image description, image understanding, and so on [7,8].However, in this paper, we don't take a usual measure to analyse image but spatial logic that is a special technique in topology and modal logic [9,10].We establish a corresponding semantic model and axiomatic system (notation: ܵ ‫ܣܫ‬ ), and then realize the image analysis in formal reasoning method.It is not only a new attempt but also a challenging approach.
In order to express our new method systematically, the framework of this paper is roughly as follows: In section 2, we introduce a formal language to express some information which we need in the following system and computer can recognize.And in section 3, we present a semantic model to represent several key operators in following system.After the previous preparation, we establish a corresponding axiom system in section 4. In the end, we have some discussion in section 5.

Syntax
Firstly, we present the syntax of ܵ ‫ܣܫ‬ .By the syntax of ܵ ‫ܣܫ‬ , we can recognize which formula is the expression of ܵ ‫ܣܫ‬ .And our reasoning system just to describe what it can express.
Definition 1 (Language ): Given a set of atomic proposition Atom ‫(‬ ∈ Atom), Boolean operators{¬, ∧, ∨, →, ↔}, spatial operators { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } , arbitrary propositions {߮, ߰} and punctuations { ), , ( }, then the language of ܵ ‫ܣܫ‬ (notation: ‫ܮ‬ ‫ܣܫ‬ ) is defined by BNF as follows: Where, the formula 1 ߮ means " ߮ is valid in the horizontal rightward", the formula 2 ߮stands for "߮ is valid in the upper right", the formula 3 ߮ stands for "߮ is valid in the lower right", the formula 4 ߮means "߮ is valid in the overlapping point", the formula 5 ߮ stands for "߮ is valid in the vertical upward", the formula 6 ߮ means "߮ is valid vertical downward", 7 ߮ means "߮ is valid in the horizontal leftward", the formulas 8 ߮ and 9 ߮ stand for "߮ is valid in the upper left" and "߮ is valid in the lower left" respectively.
In theory, image domain can be infinite, but in reality, agent visual is blame, therefore the x axis and y axis value is bounded.For convenience, we take ߅ ‫ݔ‬ and ܸ ‫ݕ‬ to represent horizontal and vertical orientation respectively.Then, we have Specifically, the point model is a major tool for measuring whether a formula ߮ ∈ ‫ܮ‬ ‫ܣܫ‬ is satisfiable on point ‫ݏ‬ or not.Sometimes in order to convenient, the parentheses of point model can be omitted in the case of no confusion.
Definition 4 (Truth): Let ߮, ߰ ∈ ‫ܮ‬ ‫ܣܫ‬ be arbitrary formulas, (ℳ ‫ܣܫ‬ , ‫,ݔ(‬ ‫))ݕ‬ be a point model ofܵ ‫ܣܫ‬ , then߮ is true on ‫,ݔ(‬ ‫)ݕ‬ in ℳ ‫ܣܫ‬ (let (ℳ ‫ܣܫ‬ , ‫,ݔ(‬ ‫))ݕ‬ ⊨ ߮be a notation for it) can be recursively defined as follows: (1) For the definition 4(1), ( 2) and (3), their semantic definitions are the same as usual definitions in other formal systems.And for the others, in order to make more detail and visual, we will explain the semantic definitions of above with figures one by one.At the same time, in this process, it shows ܵ ‫ܣܫ‬ is how to characterize the image analysis by computer.For the definition 4(8), it means "߮ is valid in the vertical upward of ‫,ݔ(‬ ‫.")ݕ‬And as shown in figure 6, they are mirror image relationship for the definitions 4 ( 8) and (9).It is easy to find 5 ߮ is valid in D= (ܿ, ܾ) if ߮is existing in F/G= (ܿ, −ܾ), and similarly 6 ߮ is valid in F/G= (ܿ, −ܾ) if ߮ is existing in D= (ܿ, ܾ).
For the definition 4(10), as shown in figure 2, 7 ߮ is a mirror image of 1 ߮, and it means " 7 ߮ is valid in ‫,ݔ(‬ ‫)ݕ‬ if ߮ is valid in the horizontal leftward of ‫,ݔ(‬ ‫.")ݕ‬ Similarly, 8 ߮ and 9 ߮ are mirrored to 3 ߮and 2 ߮.

5Discussion
We have established a reasoning system ܵ ‫ܣܫ‬ that can be used in the computer image analysis.In this system, people just need to put the image under a computer with a camera, or through computer scanning, and then the computer can according to the coordinates of system analyzes the relationship between any pixels or compositions in this image.Moreover, it can be carried out a series of location analysis, so as to achieve the expected effect of image processing in computer.We just need to compile the system in the form of a language as a programming language that can be systematically reasoning.However, we must earnestly point out this system still have some shortcomings, for instance, it fails to directly exhibit what specific area have but through indirect and tedious iteration by different operators.To solve these defects, apparently, is our future work.

Figure 1 .
Figure 1.Extract the feature points In order to highlight the relationship between point and point, the following coordinates omit the background image.For the definition 4(4), it means two points that are ‫,ݔ(‬ ‫)ݕ‬ and ‫ݔ(‬ 1 , ‫ݕ‬ 1 ) in image have the relationship of horizontal rightward.And one other thing to note is the y in ‫,ݔ(‬ ‫)ݕ‬ is equal to ‫ݕ‬ 1 in ‫ݔ(‬ 1 , ‫ݕ‬ 1 ).They can be depicted in the following figure 2. As we can see, ܽ ≺ ‫ݔ‬ ݁ , −ܾ ≺ ‫ݔ‬ ܿ , −݀ ≺ ‫ݔ‬ ܿ and ‫ݕ‬ = ‫ݕ‬ 1 = ݀ , ‫ݕ‬ = ‫ݕ‬ 1 = ܾ , ‫ݕ‬ = ‫ݕ‬ 1 = −ܾ, therefore B, D, F and G is respectively in the horizontal rightward of A, C and E. In other words, 1 ߮ is valid in point A= (ܽ, ݀) if ߮ exist in point B= (݁, ݀), 1 ߮ is valid in point C= (−ܾ, ܾ) if ߮ exist in point D= (ܿ, ܾ), and 1 ߮ is valid in point E= (−݀, −ܾ) if ߮ exist in points F and G= (ܿ, −ܾ).

Figure 5 .
Figure 5.The relationship of overlapping points