{'fraction_non_alphanumeric': 0.024839210467952982, 'fraction_numerical': 0.00391808974643306, 'mean_word_length': 4.655518394648829, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An image processing analysis of skin textures

Colour and coarseness of skin are visually different. When image processing is involved in the skin analysis, it is important to quantitatively evaluate such differences using texture features. In this paper, we discuss a texture analysis and measurements based on a statistical approach to the pattern recognition. Grain size and anisotropy are evaluated with proper diagrams. The possibility to determine the presence of pattern defects is also discussed.

processing is based on a coherence length analysis, described in detail in the following section.

Image analysis
To each pixel at the arbitrary point ( ) in the image frame we associate a grey tone b ranging from 0 to 255: ( ) is then a 2-dimensional function representative of the image intensity (brightness) distribution. Starting from function ( ) , which gives the pixel greytone, the following calculation can be performed. First of all, the mean intensity of the pixel tones is determined: where y x l , l are the x-and y-rectangular range of the image frame. More generally, the k-rank statistical moments of the image are defined in the following way: With this kind of characterisation we are then able to define the average values of the moments for the whole image frame. The distribution of pixel tones is then given according to these moments. The tone dispersion turns out to be evaluate by moment with k=2.
All integrals can be calculated on the whole image or on a window. In the case of windowing the image, moments  (1) and (2) for the whole image, supposing the image to be characterised by a single intensity distribution. However, to decide if an image exhibits irregular domains or localised defects, it is useful to estimate the quality ratio between the intensity standard deviation and the average intensity value, taken over the entire image frame, within a fixed acceptance limit, say, for instance of 50%. Let us stress the fact that a domain can be described by an intensity distribution, which can essentially differ from that of other domains or from the background distribution. In this case, it is misleading to start from the point of view that only one distribution is enough to describe the whole image frame. On the contrary, it is necessary in this case to share the image in a lattice of windows, where inside each window the quality ratio is lower than the acceptance limit. The choice of the limit value does not affect the sensitivity of the method, as the choice connected with subdividing a statistical variable range of classes does not also affect position and dispersion indices of the sample. However, it is necessary to check whether the hypothesis of homogeneity is really verified and whether preferred directions are displayed in the image frame (hypothesis of isotropy). We introduced a typical length characterising the texture size, which was very useful for characterisation of smectic and nematic phases [13,14]. Instead of measuring the homogeneity, by evaluating the histogram's entropy of intensity difference versus distance from a point of the image frame (see for instance [15]), or by calculating the spatial organisation by means of `run-length statistics' [16,17], we compute a set of coherence lengths defined in the following way. Starting from an arbitrary point ( ) where index i is ranging over the radial directions, r is the radial distance from P, and i θ is the angle formed by i-direction with the y-axis (see Fig.1 for the frame of reference). The , the pixels near the image frame boundary are not involved, because in this case it would not be possible to estimate the coherence lengths in all the directions (boundary effect). On the contrary, in standard image processing techniques [18], periodicity of the image, originally present or artificially introduced by replication of the frame, is used to overcome the boundary problem. Let us stress the fact that moments are not calculated on a window in the image frame, but on specific directions: therefore the method is different from the standard statistical approach, allowing to take into account, in a natural way, the anisotropy in the problem of texture recognition. In our analysis, we will use the 32 directions of Fig.1. Actually, we can look for anomalous behaviours of vectors as signals of the presence of a defect at the position in the image frame corresponding to given point ( ) . To discuss what can be properly considered as an anomalous behaviour of the coherence lengths, let us introduce the following average values of coherence lengths, averaged over the complete frame, for each specific i-direction: 1 Coherence length is a well-known concept in optics and condensed matter physics. In optics, it is the propagation distance from a coherent source to a point where an electromagnetic wave maintains a specified degree of coherence. In condensed matter physics, it is the distance over which order is maintained. As an example, we can tell that we have coherence in a state of the matter when we have a long-range atomic or molecular order. Coherence lengths are significantly larger than molecular size. Normally, coherence length scales the size of ordered domains in material where long-range ordering occurs, as in liquid crystals for example. The term coherence length is also used for the scale characterising the profile of average molecular orientation in the distorted transition layers, formed at a solid/liquid-crystal interface when an electric or magnetic external field is applied. along the i-direction, at which the average value of the image intensity is practically reached: this means that the distance is dependent on the threshold level. In Figure 2, the average values . The outer diagram is obtained with the 20% of the same ratio. The diagrams reveal preferential directions in the image texture, that is the anisotropy of the texture. In this paper, we consider just , on which area, when evaluating the average value of pixel intensity, we obtain the value o M , within a fixed threshold level. The diagram represents the boundary of a unit area of the image, which contains the typical features of the whole image, as we can easily see comparing diagrams with the snake scales. In fact, the unit area is behaving as the primitive unit cell in crystal lattices (see Ref. 19 for a description of unit cells in lattices). We can also consider this area, or the coherence length diagram, as a measure of the grain size and then evaluate the coarseness of the image texture. A defect in the image texture could be considered any object in the image frame with a different shape for instance, different from the shape of the unit cell, or a different cell average colour tone, and so on.

Analysis of skin textures and discussion.
The case of snake skin gives diagrams immediately recalling the properties of the unit cells in crystal lattices. This is because the texture is quite geometric. The features of human skin are of course different, but as we observe from its use in microscopy investigation of liquid crystals [13,14], it is in the case of almost homogenous images, where Fourier analysis is scarcely active, that coherence lengths are useful. We analysed with the coherence length ( i , o L ) diagrams images of human-like textures and the result in shown in Fig.3, in the middle of the figure. In the lower part of the figure, it is shown a leather texture and the corresponding analysis. The inner and outer curves have thresholds as those used to obtain diagrams of Fig.2. The shape of the two diagrams does not substantially change. The area is changing: this is due to the fact that, to be fulfilled, a lower threshold requires a wider area. On the right part of the figure, we see the detection of defects: the points marked in red are considered as "defects", whereas the pixels in green are the normal ones. It is not a segmentation procedure at the origin of the red-green maps, but a criterion involving the local behaviour of the coherence lengths ( ) In the case that we are discussing, that is the 5 case of an almost homogeneous image frame, we reasonably assumed that point ( ) At points marked in red, which are the defects, the average local coherence length ( ) . Instead, points not belonging to defects are marked in green. We use red and green half-tones to see also the original texture in this defect map. With commercial software, common procedures to identify defects are based on thresholds of grey tone [15]: this means a procedure checking whether the pixel intensity is, within a fixed tolerance, coincident or not with a specific chosen grey tone. The processing is known as "image segmentation by thresholding" and produces images segmented in two or more regions according to the used thresholds. This technique is not investigating the neighbourhood of the pixel and then it is impossible to ascertain if it is truly belonging to a defect or not. With the analysis here discussed, the detection of defects is a comparison of the local coherence lengths , that is of a local unit cell, with the coherence length i , o L diagram, the global unit cell, which is shown in the middle of Figure 3. Then, we are comparing the behaviour of a pixel neighbourhood with the average behaviour of all the pixel neighbourhoods. In the case of human skin, a defect could be a region with a paler or darker colour or a region with wrinkles, for instance. In the upper part of the Figure 3, we see an almost regular texture, with a darker region. The coherence length diagrams are telling that the texture is isotropic, and, actually we have not wrinkles. The defect map obtained as previously explained, puts in evidence the darker regions. Figure 3 shows that a texture with wrinkles has a slightly anisotropic unit cell, as the coherence length diagrams report (see the middle of the figure). Neglecting this anisotropy, the procedure of defect detection sees the regions with different intensity from the background. A procedure can be developed to compare the true shape of the local coherence area, with the global one, but this is the subject of further studies. The leather surface has no wrinkles and then behaves as the upper image in the same figure. We could consider this defect detection procedure as a good means for fault detection in leather industry. It is possible to obtain the coherence length diagram of the maps obtained from the capacitance system too (see Ref.11). In the upper part of Figure 4, we can see a map as it is from the capacitance system. In the lower part, we see the same image after a normalization of the image contrast: the capacitance image is sensitive to different hydration and to the presence of sweat, which give darker regions, and then a renormalization is required. Note that the coherence length diagrams are different, because the pixel tone distributions are different. This difference is put in evidence by the procedure of defect detection that we have previously used for the textures shown in Fig.3. In the right-upper part of Fig.4, we see the red areas concentrated where the normalization procedure must much more strongly act in changing the pixel tone distribution, to give the renormalized image. Accordingly, the rightlower image, which is the defect map of renomalized image, shows a small amount of defects.
The aim of Ref.11 was the development of a device to characterise the skin topography to measure the skin profile and the presence of wrinkles. The renormalization of images is then necessary for the segmentation of skin topography, to correlate it with skin ageing. In the case of processing images recorded by cameras, where illumination and direction of view are important, a similar normalization procedure can be quite useful too. Our image analysis of skin texture is based on the evaluation of the global grey tone distribution of whole image frame and then on the coherence length diagrams which are able to show anisotropy of the texture. The diagrams are also able to estimate texture features, such as anisotropy and coarseness: these diagrams can then adequately describe the presence of wrinkles. According to the chosen statistic parameters of grey tone distribution, several procedures to defect detection can be proposed. We followed a simple procedure able to identify local differences from the background, but more sophisticated procedures, suggested by clinical experience can be easily approached.  . The numbers on axes correspond to pixel numbers. Note that the graph is able to indicate the texture anisotropy. For the chosen threshold, diagrams are the boundary of the smallest area having the same features characterising the whole image frame.  Fig.2. On the right part of the figure, we see the detection of "defects". Points marked in red are considered as "defects" (see text for explanation). Let us note that this is not a segmentation threshold procedure, as it is possible to obtain with commercial programs. In the lower part of the figure, we see the same image after a normalization of image contrast. Note that the diagrams are different, because the pixel tone distributions are different. This difference is enhanced by the procedure of defect detection (the procedure is the same as for Fig.3). In the upper part, we see the red areas concentrated where the renormalization procedure must act in changing the pixel tone distribution. In the lower image, the number of defects is strongly reduced.