Method for calculating foot length and foot width and determining foot arch from thermo foot print
By using a temperature-sensitive footprint plate and a footprint segmentation model based on the U-Net architecture, combined with a thermal gradient attention mechanism, the system accurately calculates foot length and width and determines the transverse and longitudinal arch types. This addresses the shortcomings of existing technologies in foot data acquisition and shoe size recommendation, achieving highly accurate personalized shoe size recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING XIAOAI TECHNOLOGY CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-09
Smart Images

Figure CN122163025A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of foot data calculation and shoe size recommendation technology, specifically to a method for calculating foot length and width and determining arch height using temperature-sensitive footprints. Background Technology
[0002] With the improvement of people's living standards and the increasing emphasis on healthy exercise, higher demands are being placed on the comfort, functionality, and fit of footwear products. Well-fitting shoes not only provide good athletic performance but also effectively protect foot health and prevent sports injuries. Therefore, accurately acquiring foot data and recommending the appropriate shoe size has become a key focus for the footwear industry and the field of foot health testing.
[0003] In existing technologies, foot data acquisition primarily relies on physical measurement methods and optical image-based measurement methods. Traditional physical measurement typically uses a Brockman ruler or a simple straight ruler. While simple, this method is highly susceptible to influences from the test subject's posture, the measurer's technique, and foot deformation under stress. Optical image-based measurement techniques, although automated to some extent, still have significant drawbacks in practical applications. Existing optical measurements often directly extract edges from photographs of the foot. Due to the lack of clear boundaries characteristic of temperature-sensing imaging, background interference, lighting and shadows, and blurred foot edges easily lead to inaccurate contour extraction, resulting in distorted foot length and width data that cannot provide a reliable basis for subsequent shoe size recommendations.
[0004] In foot morphology analysis, calculating the transverse arch and longitudinal arch is crucial for understanding foot structure. The transverse arch primarily affects the width distribution and force distribution of the forefoot, while the longitudinal arch (commonly referred to as arch height) directly determines the height of the medial longitudinal arch and the distribution of plantar pressure. Accurately identifying the type of transverse and longitudinal arches (e.g., normal, flat feet, high arches) is central to assessing foot biomechanical characteristics. However, existing methods for calculating foot data only focus on the single dimensions of foot length and width, neglecting in-depth analysis of the transverse and longitudinal arch morphology. This fails to quantify the three-dimensional structural characteristics of the foot, resulting in the inability to identify special foot types such as flat feet and hallux valgus, thus rendering subsequent analyses based on this data lacking scientific rigor.
[0005] In the shoe size recommendation process, most existing technologies rely solely on measured foot length and width data, directly referencing standard shoe size charts. However, users with different arch types, even with the same foot length and width, have completely different needs for shoe space. For example, users with flat feet typically have a larger footprint area, and their transverse arches are often collapsed. If recommendations are based solely on physical length, shoes may fit well but be too tight in the forefoot or restrict foot movement at the arch. Conversely, users with high arches require more cushioning space in the sole. Existing technologies lack effective identification and quantitative correction for transverse and longitudinal arch types, failing to compensate or adjust the original data based on the user's arch shape. This results in recommended shoe sizes that only match in length, significantly reducing the accuracy and reliability of the recommendations and failing to meet users' precise needs for personalized and comfortable footwear selection.
[0006] In summary, existing technologies have significant shortcomings in terms of the accuracy of foot data acquisition, the depth of arch morphology analysis, and the suitability of shoe size recommendations. Summary of the Invention
[0007] To address the shortcomings of the existing technologies, the technical problem this invention aims to solve is: how to provide a method for calculating foot length and width and determining arch height using temperature-sensitive footprints, which can combine temperature-sensitive imaging to accurately calculate multi-dimensional foot data and dynamically correct based on the type of transverse and longitudinal arches, thereby improving the accuracy and reliability of foot data calculation and shoe size recommendation.
[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0009] A method for calculating foot length and width and determining arch height using temperature-sensitive footprints, including:
[0010] S1: Acquire the temperature-sensitive footprint image of the test subject using a temperature-sensitive footprint plate;
[0011] S2: Divide the temperature-sensitive footprint image into footprint regions to obtain the tester's sole region, toe region, and temperature-sensitive material region;
[0012] S3: Based on the number of pixels in the tester's foot area, toe area, and temperature-sensitive material area, combined with a preset ratio, calculate the corresponding foot length and foot width data;
[0013] S4: Based on the tester's foot area, combined with foot length and foot width data, determine the transverse and longitudinal arch types to obtain the transverse and longitudinal arch types;
[0014] S5: Based on the tester's transverse arch type and longitudinal arch type, correct their foot length and width data, and recommend shoe size based on the corrected foot length and width data to obtain the corresponding optimal recommended shoe size.
[0015] Preferably, in step S1, the test subject stands barefoot on a temperature-sensitive footprint plate with a temperature-sensitive material area. The temperature-sensitive material area changes color with the temperature of the test subject's sole, forming a footprint outline. An image acquisition device is used to take a vertical picture of the temperature-sensitive footprint plate from directly above, and an image of the temperature-sensitive material area containing the footprint outline is obtained as a temperature-sensitive footprint image.
[0016] Preferably, in step S2, the temperature-sensitive footprint image is divided into five independent regions: the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region.
[0017] The steps for partitioning temperature-sensitive footprint images include:
[0018] S201: Perform color space conversion on the temperature-sensitive footprint image, extract the grayscale difference features between the footprint area and the temperature-sensitive material area, and obtain a grayscale difference feature map.
[0019] S202: Identify five target regions in the grayscale difference feature map—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—using the footprint segmentation model to obtain a five-region identification map;
[0020] S203: Extract pixels from each region according to the region identifiers in the five-region identifier map to obtain five independent region images: left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region.
[0021] Preferably, in step S202, the processing steps of the footprint segmentation model include:
[0022] S2021: Standardize the grayscale difference feature map to obtain a standardized input image;
[0023] S2022: The encoder performs multi-scale feature extraction on the standardized input image through multiple cascaded feature extraction layers to obtain feature maps at multiple scales;
[0024] S2023: Perform thermal gradient attention feature enhancement on feature maps at multiple scales using a thermal gradient attention module to obtain attention-enhanced feature maps at multiple scales;
[0025] S2024: The decoder performs multi-scale feature fusion on attention-enhanced feature maps at multiple scales through multi-layer upsampling to obtain a high-resolution fused feature map;
[0026] S2025: The high-resolution fused feature map is classified into five regions at the pixel level using a pixel-level classification module to obtain a five-region label map.
[0027] Preferably, in step S2023, the processing steps of the thermal gradient attention module include:
[0028] 1) Calculate the horizontal and vertical gradients of the input feature map using the Sobel operator to obtain the thermal gradient distribution map;
[0029] 2) Perform 1×1 convolution and Sigmoid activation function processing on the thermal gradient distribution map to calculate thermal gradient attention and generate a spatial attention weight map;
[0030] The formula is expressed as:
[0031] ;
[0032] In the formula: Indicates position Attention weights at each location; This represents the Sigmoid activation function; Indicates the first Channel weighting coefficients; Indicates the first The passage is in the location The thermal gradient value at that location; Indicates the bias term; Indicates the number of feature channels;
[0033] 3) Multiply and weight the input feature map and the spatial attention weight map element by element to obtain the attention-enhanced feature map.
[0034] Preferably, in step S2025, the processing steps of the pixel-level classification module include:
[0035] 1) Perform a 1×1 convolution on the high-resolution fused feature map to map the number of channels to the number of classes, resulting in a five-channel logits map;
[0036] 2) Perform Softmax normalization on the five channel values of each pixel in the five-channel logits image to obtain the region label of each pixel and generate a five-region label map;
[0037] The formula for calculating region labels is expressed as follows:
[0038] ;
[0039] In the formula: Indicates position The area label; Indicates the region category index (1-5); Indicates position First The logits value of the class.
[0040] Preferably, in step S3, the processing steps for calculating foot length data and foot width data include:
[0041] S301: Standardize the pixel values of five independent regions—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—to obtain a binary segmentation map.
[0042] S302: Extract each target region from the binary segmentation image according to the region identifier to obtain five independent binary region images, including the binary region images of the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region;
[0043] S303: Calculate the principal axis angles of the five binary region images, and rotate the five binary region images to a vertical position based on the principal axis angles to obtain the rotated five binary region images;
[0044] S304: Calculate the number of pixels in the length direction and the number of pixels in the width direction of the five binary regions after rotation;
[0045] S305: Based on the number of pixels in the length direction of the five binary region images after rotation, calculate the actual foot length using a proportional conversion formula to obtain the left foot length and the right foot length.
[0046] The formula is expressed as:
[0047] ;
[0048] ;
[0049] In the formula: , This indicates the length of the left foot and the length of the right foot; , This represents the number of pixels along the length of the left and right toe regions; , This represents the number of pixels along the length of the left and right foot ball areas; Indicates the preset actual length of the temperature-sensing material area; This indicates the number of pixels along the length of the temperature-sensitive material area;
[0050] S306: Based on the number of pixels in the width direction of the five binary region images after rotation, calculate the actual foot width using a proportional conversion formula to obtain the left foot width and right foot width;
[0051] The formula is expressed as:
[0052] ;
[0053] ;
[0054] In the formula: , This indicates the width of the left foot and the width of the right foot; , This represents the number of pixels in the width direction of the left and right foot ball areas; Indicates the preset actual width of the temperature-sensing material area; This indicates the number of pixels in the width direction of the temperature-sensing material area.
[0055] Preferably, in step S4, the processing steps for determining the type of transverse bow include:
[0056] S401: Calculate the minimum bounding rectangle boundary of the binary image of the rotated foot region and obtain the bounding rectangle parameters;
[0057] S402: Based on the circumscribed rectangle parameters, the forefoot region of the binary image of the foot region is cropped according to the height ratio as the transverse arch calculation region to obtain the transverse arch calculation region image;
[0058] S403: Calculate the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image;
[0059] S404: Calculate the transverse arch ratio based on the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image;
[0060] The formula for calculating the transverse arch ratio is expressed as follows:
[0061] ;
[0062] In the formula: This represents the ratio of the areas of the transverse arches; This represents the area of the foot portion within the cross-arch calculation region; This represents the total area of the calculation region for the horizontal bow;
[0063] S405: Determine the type of bow based on the bow ratio.
[0064] Preferably, in step S4, the processing steps for determining the longitudinal bow type include:
[0065] S411: Divide the rotated binary image of the foot region into three equal parts according to the height of the arch, namely the forefoot, midfoot, and hindfoot, to obtain three sub-region images of the forefoot, midfoot, and hindfoot.
[0066] S412: Calculate the number of pixels in the three sub-region images of forefoot, midfoot, and hindfoot, calculate the area of the midfoot sub-region image, and calculate the total area of the three sub-regions of forefoot, midfoot, and hindfoot.
[0067] S413: Calculate the longitudinal arch ratio based on the area of the midfoot sub-region image and the total area of the three sub-regions: forefoot, midfoot, and hindfoot.
[0068] The formula for calculating the longitudinal bow ratio is as follows:
[0069] ;
[0070] In the formula: Indicates the longitudinal arch ratio; This represents the area of the midfoot sub-region image; This represents the total area of the forefoot, midfoot, and hindfoot sub-regions.
[0071] S414: Determine the type of longitudinal bow based on the longitudinal bow ratio.
[0072] Preferably, in step S5, the processing steps for correcting the foot length and foot width data based on the tester's transverse arch type and longitudinal arch type include:
[0073] S501: Determine the corresponding horizontal bow fraction and vertical bow fraction based on the horizontal bow type and the vertical bow type;
[0074] S502: The foot arch quantification index is calculated based on the transverse arch score and the longitudinal arch score, combined with foot length and foot width data.
[0075] The formula is expressed as:
[0076] ;
[0077] In the formula: Indicates the arch quantification index; , Indicate the fractions of the horizontal and vertical bows; , This represents foot length and foot width data;
[0078] S503: Based on the foot arch quantification index, combined with the transverse arch score and longitudinal arch score, as well as foot length data and foot width data, calculate the foot length correction coefficient and foot width correction coefficient;
[0079] The formula is expressed as:
[0080] ;
[0081] ;
[0082] ;
[0083] ;
[0084] In the formula: , Indicates the foot length correction factor and the foot width correction factor; , Indicates the influence coefficients of the transverse bow and the longitudinal bow;
[0085] S504: Correct the foot length data and foot width data based on the foot length correction coefficient and foot width correction coefficient respectively to obtain the corrected foot length data and foot width data;
[0086]
[0087] ;
[0088] In the formula: , This indicates the corrected foot length and foot width data.
[0089] Compared with existing technologies, the methods for calculating foot length and width and determining arch height using temperature-sensitive footprints in this invention have the following advantages:
[0090] This invention improves the reliability of image recognition and the benchmark accuracy of subsequent measurements by performing footprint segmentation on temperature-sensitive footprint images. Traditional optical measurements are often limited by background interference or blurred foot edges, making contour extraction difficult. This invention utilizes the temperature-sensitive material's color-changing properties to acquire the original image and, through a footprint segmentation model based on the U-Net architecture combined with a thermal gradient attention mechanism, can accurately identify and separate the sole, toes, and temperature-sensitive material background regions. By decoupling the complex footprint image into independent region images, the interference of background noise on edge detection is eliminated, ensuring that the extracted footprint contours are based on the real temperature-sensitive response areas, rather than optical shadows or noise. This feature-based precise segmentation greatly improves the robustness of image processing.
[0091] This invention, based on the footprint area and background area of a footprint partition, calculates foot length and width using pixel count and a preset ratio. This effectively solves the problems of large errors, strong subjectivity, and proportional distortion caused by the lack of reference points in traditional manual measurements and ordinary photographic measurements. By identifying the actual physical size of the temperature-sensitive material area as a calibration benchmark, the image pixel units are accurately converted into actual physical units. Calculations based on the pixel distribution of the sole and toe areas capture the most realistic dimensions of the foot in its extended state, avoiding parallax errors inherent in human readings. This method, combining image pixel statistics with physical calibration, ensures highly repeatable and objective measurement results, providing users with reliable basic foot data.
[0092] This invention breaks through the limitations of traditional methods that only measure length and width, innovatively introducing a dual judgment mechanism for both the transverse and longitudinal arches. Through an algorithm, a specific proportion of the foot image is cropped (e.g., the first 15%-40% for the transverse arch and the third part for the longitudinal arch), and the corresponding area ratios are calculated to accurately determine the degree of arch collapse or high arch. Simple length and width values cannot reflect the three-dimensional structure and stress characteristics of the foot. This invention, by quantifying the transverse and longitudinal arch ratios, can objectively distinguish between normal feet, flat feet, high arches, and different degrees of collapse. The image area feature-based analysis method can capture subtle morphological differences in the foot, providing crucial physiological structural evidence for subsequent personalized shoe size recommendations, greatly improving the reliability and scientific rigor of arch assessment.
[0093] This invention combines arch type with basic dimensions, establishing a quantitative arch index to correct foot length and width, and recommending the optimal shoe size. Because different arch types (such as flat feet or high arches) have different internal space requirements when wearing shoes, simple physical dimensions often cannot directly correspond to standard shoe sizes. This invention dynamically corrects the original data by introducing transverse and longitudinal arch scores, simulating the actual expansion space requirements of the foot within the shoe. The physiologically-based correction algorithm ensures that the recommended shoe size is not only suitable in length but also perfectly accommodates the user's arch shape in width and circumference, thus avoiding problems such as rubbing, squeezing, or heel slippage caused by foot shape differences, significantly improving the accuracy and comfort of shoe size recommendations. Attached Figure Description
[0094] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:
[0095] Figure 1 A logic diagram for calculating foot length and width and determining arch height using temperature-sensitive footprints.
[0096] Figure 2 This is a picture of the actual product of the temperature-sensitive footprint plate.
[0097] Figure 3 Binary segmentation images of the footprint area and the temperature-sensitive material area: Figure 3 (a) is a binary image of the footprint region (including the left toe region, left foot region, right toe region, and right foot region). Figure 3 (b) is a binary image of the temperature-sensitive material region.
[0098] Figure 4 The rotated binary region image: Figure 4 (a) is a binary image of the rotated left toe region and left foot region. Figure 4 (b) is a binary image of the temperature-sensitive material region after rotation.
[0099] Figure 5 A schematic diagram of the region image calculated for the transverse arch: Figure 5 (a) is a binary image of the left foot's sole region. Figure 5 (b) is the calculation area for the transverse arch of the left foot.
[0100] Figure 6 A schematic diagram of the foot arch being divided into three equal parts. Detailed Implementation
[0101] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but only to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0102] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the figures, or the orientation or positional relationship commonly used when the product is in use. They are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. In addition, the terms "horizontal," "vertical," etc., do not mean that the component is required to be absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0103] The following detailed explanation illustrates the specific implementation methods:
[0104] Example:
[0105] This embodiment discloses a method for calculating foot length and width and determining arch height using temperature-sensitive footprints.
[0106] like Figure 1 As shown, a method for calculating foot length and width and determining arch height using temperature-sensitive footprints includes:
[0107] S1: Acquire the temperature-sensitive footprint image of the test subject using a temperature-sensitive footprint plate;
[0108] S2: Divide the temperature-sensitive footprint image into footprint regions to obtain the tester's sole region, toe region, and temperature-sensitive material region;
[0109] S3: Based on the number of pixels in the tester's foot area, toe area, and temperature-sensitive material area, combined with a preset ratio, calculate the corresponding foot length and foot width data;
[0110] S4: Based on the tester's foot area, combined with foot length and foot width data, determine the transverse and longitudinal arch types to obtain the transverse and longitudinal arch types;
[0111] S5: Based on the tester's transverse arch type and longitudinal arch type, correct their foot length and width data, and recommend shoe size based on the corrected foot length and width data to obtain the corresponding optimal recommended shoe size.
[0112] In this embodiment, the shoe size corresponding to the corrected foot length and foot width data is selected as the optimal recommended shoe size.
[0113] To better illustrate the technical solution of the present invention, this embodiment will be described in more detail through the following parts.
[0114] 1. Temperature-sensitive footprint board
[0115] In the specific implementation process, the test subjects stood barefoot in a place such as Figure 2 The temperature-sensitive footprint plate shown has a temperature-sensitive material area. The temperature-sensitive material area changes color with the temperature of the test subject's sole, forming the outline of the (left and right) footprints. The temperature-sensitive footprint plate is photographed vertically from directly above using an image acquisition device (camera or scanning device) to obtain an image of the temperature-sensitive material area containing the outline of the (left and right) footprints as the temperature-sensitive footprint image.
[0116] In this embodiment, the acquired temperature-sensitive footprint images can be further processed by noise reduction and brightness equalization to ensure that the edges of the footprints are clearly distinguishable.
[0117] II. Footprint Sections
[0118] In the specific implementation process, the temperature-sensitive footprint image is divided into five independent regions: the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region (background region).
[0119] Specifically, the steps for partitioning temperature-sensitive footprint images include:
[0120] S201: Perform color space conversion on the temperature-sensitive footprint image, extract the grayscale difference features between the footprint area and the temperature-sensitive material area, and obtain a grayscale difference feature map.
[0121] In this embodiment, color space conversion refers to converting from RGB color space to HSV color space and extracting saturation channel features.
[0122] S202: Identify five target regions in the grayscale difference feature map—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—using the footprint segmentation model to obtain a five-region identification map;
[0123] In this embodiment, the footprint segmentation model is built and trained based on the U-Net architecture.
[0124] S203: Extract pixels from each region according to the region identifiers in the five-region identifier map to obtain five independent region images: left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region.
[0125] In this embodiment, the regional connectivity and boundary integrity of the five independent region images can be further checked.
[0126] Specifically, the processing steps for the footprint segmentation model include:
[0127] S2021: Standardize the grayscale difference feature map to obtain a standardized input image;
[0128] In this embodiment, the standardization process includes scaling the grayscale difference feature map to the model input size and then mapping the pixel values from the range of [0,255] to the range of [0,1] to expand the single-channel grayscale image into a three-channel image.
[0129] S2022: The encoder performs multi-scale feature extraction on the standardized input image through multiple cascaded feature extraction layers to obtain feature maps at multiple scales;
[0130] In this embodiment, the encoder includes four cascaded feature extraction layers, each outputting a feature map at a corresponding scale, resulting in four feature maps at different scales. Each of the four feature extraction layers includes two cascaded 3×3 convolutional layers, a ReLU activation layer, and a 2×2 max pooling layer.
[0131] S2023: Perform thermal gradient attention feature enhancement on feature maps at multiple scales using a thermal gradient attention module to obtain attention-enhanced feature maps at multiple scales;
[0132] S2024: The decoder performs multi-scale feature fusion on attention-enhanced feature maps at multiple scales through multi-layer upsampling to obtain a high-resolution fused feature map;
[0133] In this embodiment, the input to the decoder includes attention-enhanced feature maps at four scales, and the multi-scale feature fusion processing steps of the decoder include:
[0134] 1) The attention-enhanced feature map of the fourth scale (layer) is upsampled by the first layer and fused with the attention-enhanced feature map of the third scale to obtain the first layer fused feature map;
[0135] 2) The first-layer fused feature map is upsampled by the second-layer upsampling and fused with the attention-enhanced feature map of the second scale to obtain the second-layer fused feature map;
[0136] 3) The second-layer fused feature map is upsampled by the third-layer upsampling and fused with the attention-enhanced feature map of the first scale to obtain the third-layer fused feature map;
[0137] 4) The third-layer fused feature map is upsampled to the original input size by the fourth-layer upsampling to obtain a high-resolution fused feature map.
[0138] The first to third layer upsampling each consists of cascaded 2×2 transposed convolution upsampling, channel concatenation, and two 3×3 convolutions. The fourth layer upsampling consists of cascaded 2×2 transposed convolution upsampling and two 3×3 convolutions.
[0139] S2025: The high-resolution fused feature map is classified into five regions at the pixel level using a pixel-level classification module to obtain a five-region label map.
[0140] In this embodiment, the five-region identification map can be further subjected to boundary detection, boundary refinement, and label correction. The processing steps of the boundary enhancement module include:
[0141] 1) Take the category index corresponding to the highest probability in the five-region label map pixel by pixel, and convert the five-region label map into the initial region label map;
[0142] 2) Perform boundary detection on the initial region label map: calculate the label difference between adjacent pixels, identify boundary pixels, and obtain the boundary pixel mask;
[0143] 3) Perform morphological thinning (morphological opening and closing operations) on the boundary pixel mask to obtain the thinned boundary mask;
[0144] 4) By combining the initial region label map, the refined boundary mask, and the input five-region label map, the labels in the boundary regions are corrected using probability-weighted voting to obtain the corrected five-region label map.
[0145] The specific processing steps of the thermal gradient attention module include:
[0146] 1) Calculate the horizontal and vertical gradients of the input feature map using the Sobel operator to obtain the thermal gradient distribution map;
[0147] 2) Perform 1×1 convolution and Sigmoid activation function processing on the thermal gradient distribution map to calculate thermal gradient attention and generate a spatial attention weight map;
[0148] The formula is expressed as:
[0149] ;
[0150] In the formula: Indicates position Attention weights at each location; This represents the Sigmoid activation function; Indicates the first Channel weighting coefficients; Indicates the first The passage is in the location The thermal gradient value at that location; Indicates the bias term; Indicates the number of feature channels;
[0151] 3) Multiply and weight the input feature map and the spatial attention weight map element by element to obtain the attention-enhanced feature map.
[0152] Specifically, the processing steps of the pixel-level classification module include:
[0153] 1) Perform a 1×1 convolution on the high-resolution fused feature map to map the number of channels to the number of classes, resulting in a five-channel logits map;
[0154] 2) Perform Softmax normalization on the five channel values of each pixel in the five-channel logits image to obtain the region label of each pixel and generate a five-region label map;
[0155] The formula for calculating region labels is expressed as follows:
[0156] ;
[0157] In the formula: Indicates position The area label; Indicates the region category index (1-5); Indicates position First The logits value of the class.
[0158] This invention improves the reliability of image recognition and the benchmark accuracy of subsequent measurements by performing footprint segmentation on temperature-sensitive footprint images. Traditional optical measurements are often limited by background interference or blurred foot edges, making contour extraction difficult. This invention utilizes the temperature-sensitive material's color-changing properties to acquire the original image and, through a footprint segmentation model based on the U-Net architecture combined with a thermal gradient attention mechanism, can accurately identify and separate the sole, toes, and temperature-sensitive material background regions. By decoupling the complex footprint image into independent region images, the interference of background noise on edge detection is eliminated, ensuring that the extracted footprint contours are based on the real temperature-sensitive response areas, rather than optical shadows or noise. This feature-based precise segmentation greatly improves the robustness of image processing.
[0159] III. Calculate foot length and foot width
[0160] In the specific implementation process, the processing steps for calculating foot length and foot width data include:
[0161] S301: Standardize the pixel values of five independent regions—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—to obtain a binary segmentation map; such as... Figure 3 As shown, the footprint area (left toe area, left foot area, right toe area, and right foot area) is white (pixel value 255), and the temperature-sensitive material area is black (pixel value 0).
[0162] S302: Extract each target region from the binary segmentation image according to the region identifier to obtain five independent binary region images, including the binary region images of the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region;
[0163] S303: Calculate the principal axis angles of the five binary region images, and rotate the five binary region images to a vertical position based on the principal axis angles to obtain the rotated five binary region images, such as... Figure 4 As shown.
[0164] S304: Calculate the number of pixels in the length direction and the number of pixels in the width direction of the five binary regions after rotation;
[0165] S305: Based on the number of pixels in the length direction of the five binary region images after rotation, calculate the actual foot length using a proportional conversion formula to obtain the left foot length and the right foot length.
[0166] The formula is expressed as:
[0167] ;
[0168] ;
[0169] In the formula: , This indicates the length of the left foot and the length of the right foot; , This represents the number of pixels along the length of the left and right toe regions; , This represents the number of pixels along the length of the left and right foot ball areas; Indicates the preset actual length of the temperature-sensing material area; This indicates the number of pixels along the length of the temperature-sensitive material area;
[0170] S306: Based on the number of pixels in the width direction of the five binary region images after rotation, calculate the actual foot width using a proportional conversion formula to obtain the left foot width and right foot width;
[0171] The formula is expressed as:
[0172] ;
[0173] ;
[0174] In the formula: , This indicates the width of the left foot and the width of the right foot; , This represents the number of pixels in the width direction of the left and right foot ball areas; Indicates the preset actual width of the temperature-sensing material area; This indicates the number of pixels in the width direction of the temperature-sensing material area.
[0175] This invention, based on the footprint area and background area of a footprint partition, calculates foot length and width using pixel count and a preset ratio. This effectively solves the problems of large errors, strong subjectivity, and proportional distortion caused by the lack of reference points in traditional manual measurements and ordinary photographic measurements. By identifying the actual physical size of the temperature-sensitive material area as a calibration benchmark, the image pixel units are accurately converted into actual physical units. Calculations based on the pixel distribution of the sole and toe areas capture the most realistic dimensions of the foot in its extended state, avoiding parallax errors inherent in human readings. This method, combining image pixel statistics with physical calibration, ensures highly repeatable and objective measurement results, providing users with reliable basic foot data.
[0176] IV. Determining the Type of Horizontal Bow
[0177] In specific implementation, the steps for determining the type of horizontal bow include:
[0178] S401: Calculate the minimum bounding rectangle boundary of the binary image of the rotated foot region and obtain the bounding rectangle parameters;
[0179] S402: Based on the circumscribed rectangle parameters, the forefoot region of the binary image of the foot region is cropped according to the height ratio as the transverse arch calculation region to obtain the transverse arch calculation region image;
[0180] In this embodiment, as Figure 5 The area of the foot region, specifically the area from 15% to 40% of the smallest bounding rectangle of the binary image, is selected as the calculation region for the transverse arch.
[0181] S403: Calculate the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image;
[0182] In this embodiment, the area data is obtained by counting the number of white pixels and the total number of pixels.
[0183] S404: Calculate the transverse arch ratio based on the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image;
[0184] The formula for calculating the transverse arch ratio is expressed as follows:
[0185] ;
[0186] In the formula: This represents the ratio of the areas of the transverse arches; This represents the area of the foot portion within the cross-arch calculation region; This represents the total area of the calculation region for the horizontal bow;
[0187] S405: Determine the type of bow based on the bow ratio.
[0188] The logic for determining the horizontal bow type includes:
[0189] like If so, the transverse bow type is normal;
[0190] like If so, the transverse arch type is mild collapse;
[0191] like If so, the transverse arch type is moderate collapse;
[0192] like If so, the horizontal arch type is severe collapse.
[0193] V. Determining the Type of Longitudinal Bow
[0194] In specific implementation, the steps for determining the type of longitudinal bow include:
[0195] S411: As Figure 6 As shown, the rotated binary image of the foot region is divided into three equal parts according to the height of the arch, namely the forefoot, midfoot, and hindfoot, resulting in three sub-region images of the forefoot, midfoot, and hindfoot.
[0196] S412: Calculate the number of pixels in the three sub-region images of forefoot, midfoot, and hindfoot, calculate the area of the midfoot sub-region image, and calculate the total area of the three sub-regions of forefoot, midfoot, and hindfoot.
[0197] S413: Calculate the longitudinal arch ratio based on the area of the midfoot sub-region image and the total area of the three sub-regions: forefoot, midfoot, and hindfoot.
[0198] The formula for calculating the longitudinal bow ratio is as follows:
[0199] ;
[0200] In the formula: Indicates the longitudinal arch ratio; This represents the area of the midfoot sub-region image; This represents the total area of the forefoot, midfoot, and hindfoot sub-regions.
[0201] S414: Determine the type of longitudinal bow based on the longitudinal bow ratio.
[0202] The logic for determining the longitudinal bow type includes:
[0203] like Then the type of longitudinal bow is a high-footed bow;
[0204] like If so, the longitudinal arch type is normal foot arch;
[0205] like If so, the longitudinal arch type is slightly flattened;
[0206] like Then the longitudinal arch type is moderately flattened;
[0207] like If so, the longitudinal arch type is severely flattened.
[0208] This invention breaks through the limitations of traditional methods that only measure length and width, innovatively introducing a dual judgment mechanism for both the transverse and longitudinal arches. Through an algorithm, a specific proportion of the foot image is cropped (e.g., the first 15%-40% for the transverse arch and the third part for the longitudinal arch), and the corresponding area ratios are calculated to accurately determine the degree of arch collapse or high arch. Simple length and width values cannot reflect the three-dimensional structure and stress characteristics of the foot. This invention, by quantifying the transverse and longitudinal arch ratios, can objectively distinguish between normal feet, flat feet, high arches, and different degrees of collapse. The image area feature-based analysis method can capture subtle morphological differences in the foot, providing crucial physiological structural evidence for subsequent personalized shoe size recommendations, greatly improving the reliability and scientific rigor of arch assessment.
[0209] VI. Correcting foot length and width
[0210] In the specific implementation process, the steps for correcting the foot length and foot width data based on the tester's transverse arch type and longitudinal arch type include:
[0211] S501: Determine the corresponding horizontal bow fraction and vertical bow fraction based on the horizontal bow type and the vertical bow type;
[0212] In this embodiment, the transverse arch scores are: normal (Level 1), mild collapse (Level 2), moderate collapse (Level 3), and severe collapse (Level 4). The longitudinal arch scores are: high arch (Level 1), normal arch (Level 2), mild flat feet (Level 3), moderate flat feet (Level 4), and severe flat feet (Level 5). It should be noted that when the transverse and longitudinal arch scores of the left and right feet are inconsistent, the score with the larger value shall prevail.
[0213] S502: The foot arch quantification index is calculated based on the transverse arch score and the longitudinal arch score, combined with foot length and foot width data.
[0214] The formula is expressed as:
[0215] ;
[0216] In the formula: Indicates the arch quantification index; , Indicate the fractions of the horizontal and vertical bows; , This indicates the foot length and foot width data. It should be noted that when the foot length and foot width data of the left and right feet are different, the larger value of the foot length and foot width data shall prevail.
[0217] S503: Based on the foot arch quantification index, combined with the transverse arch score and longitudinal arch score, as well as foot length data and foot width data, calculate the foot length correction coefficient and foot width correction coefficient;
[0218] The formula is expressed as:
[0219] ;
[0220] ;
[0221] ;
[0222] ;
[0223] In the formula: , Indicates the foot length correction factor and the foot width correction factor; , Indicates the influence coefficients of the transverse bow and the longitudinal bow;
[0224] S504: Correct the foot length data and foot width data based on the foot length correction coefficient and foot width correction coefficient respectively to obtain the corrected foot length data and foot width data;
[0225]
[0226] ;
[0227] In the formula: , This indicates the corrected foot length and foot width data.
[0228] This invention combines arch type with basic dimensions, establishing a quantitative arch index to correct foot length and width, and recommending the optimal shoe size. Because different arch types (such as flat feet or high arches) have different internal space requirements when wearing shoes, simple physical dimensions often cannot directly correspond to standard shoe sizes. This invention dynamically corrects the original data by introducing transverse and longitudinal arch scores, simulating the actual expansion space requirements of the foot within the shoe. The physiologically-based correction algorithm ensures that the recommended shoe size is not only suitable in length but also perfectly accommodates the user's arch shape in width and circumference, thus avoiding problems such as rubbing, squeezing, or heel slippage caused by foot shape differences, significantly improving the accuracy and comfort of shoe size recommendations.
[0229] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.
Claims
1. A method for calculating foot length and width and determining arch height using temperature-sensitive footprints, characterized in that, include: S1: Acquire the temperature-sensitive footprint image of the test subject using a temperature-sensitive footprint plate; S2: Divide the temperature-sensitive footprint image into footprint regions to obtain the tester's sole region, toe region, and temperature-sensitive material region; S3: Based on the number of pixels in the tester's foot area, toe area, and temperature-sensitive material area, combined with a preset ratio, calculate the corresponding foot length and foot width data; S4: Based on the tester's foot area, combined with foot length and foot width data, determine the transverse and longitudinal arch types to obtain the transverse and longitudinal arch types; S5: Based on the tester's transverse arch type and longitudinal arch type, correct their foot length and width data, and recommend shoe size based on the corrected foot length and width data to obtain the corresponding optimal recommended shoe size.
2. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 1, characterized in that: In step S1, the test subject stands barefoot on a temperature-sensitive footprint board with a temperature-sensitive material area. The temperature-sensitive material area changes color as the temperature of the test subject's sole changes, forming a footprint outline. An image acquisition device is used to take a vertical picture of the temperature-sensitive footprint board from directly above, and the image of the temperature-sensitive material area containing the footprint outline is obtained as the temperature-sensitive footprint image.
3. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 1, characterized in that: In step S2, the temperature-sensitive footprint image is divided into five independent regions: the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region. The steps for partitioning temperature-sensitive footprint images include: S201: Perform color space conversion on the temperature-sensitive footprint image, extract the grayscale difference features between the footprint area and the temperature-sensitive material area, and obtain a grayscale difference feature map. S202: Identify five target regions in the grayscale difference feature map—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—using the footprint segmentation model to obtain a five-region identification map; S203: Extract pixels from each region according to the region identifiers in the five-region identifier map to obtain five independent region images: left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region.
4. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 3, characterized in that: In step S202, the processing steps for the footprint segmentation model include: S2021: Standardize the grayscale difference feature map to obtain a standardized input image; S2022: The encoder performs multi-scale feature extraction on the standardized input image through multiple cascaded feature extraction layers to obtain feature maps at multiple scales; S2023: Perform thermal gradient attention feature enhancement on feature maps at multiple scales using a thermal gradient attention module to obtain attention-enhanced feature maps at multiple scales; S2024: The decoder performs multi-scale feature fusion on attention-enhanced feature maps at multiple scales through multi-layer upsampling to obtain a high-resolution fused feature map; S2025: The high-resolution fused feature map is classified into five regions at the pixel level using a pixel-level classification module to obtain a five-region label map.
5. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 4, characterized in that: In step S2023, the processing steps of the thermal gradient attention module include: 1) Calculate the horizontal and vertical gradients of the input feature map using the Sobel operator to obtain the thermal gradient distribution map; 2) Perform 1×1 convolution and Sigmoid activation function processing on the thermal gradient distribution map to calculate thermal gradient attention and generate a spatial attention weight map; The formula is expressed as: ; In the formula: Indicates position Attention weights at each location; This represents the Sigmoid activation function; Indicates the first Channel weighting coefficients; Indicates the first The passage is in the location The thermal gradient value at that location; Indicates the bias term; Indicates the number of feature channels; 3) Multiply and weight the input feature map and the spatial attention weight map element by element to obtain the attention-enhanced feature map.
6. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 4, characterized in that: In step S2025, the processing steps of the pixel-level classification module include: 1) Perform a 1×1 convolution on the high-resolution fused feature map to map the number of channels to the number of classes, resulting in a five-channel logits map; 2) Perform Softmax normalization on the five channel values of each pixel in the five-channel logits image to obtain the region label of each pixel and generate a five-region label map; The formula for calculating region labels is expressed as follows: ; In the formula: Indicates position The area label; Indicates the region category index (1-5); Indicates position First The logits value of the class.
7. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 3, characterized in that: Step S3, the processing steps for calculating foot length and foot width data include: S301: Standardize the pixel values of five independent regions—left toe region, left foot region, right toe region, right foot region, and temperature-sensitive material region—to obtain a binary segmentation map. S302: Extract each target region from the binary segmentation image according to the region identifier to obtain five independent binary region images, including the binary region images of the left toe region, the left foot region, the right toe region, the right foot region, and the temperature-sensitive material region; S303: Calculate the principal axis angles of the five binary region images, and rotate the five binary region images to a vertical position based on the principal axis angles to obtain the rotated five binary region images; S304: Calculate the number of pixels in the length direction and the number of pixels in the width direction of the five binary regions after rotation; S305: Based on the number of pixels in the length direction of the five binary region images after rotation, calculate the actual foot length using a proportional conversion formula to obtain the left foot length and the right foot length. The formula is expressed as: ; ; In the formula: , This indicates the length of the left foot and the length of the right foot; , This represents the number of pixels along the length of the left and right toe regions; , This represents the number of pixels along the length of the left and right foot ball areas; Indicates the preset actual length of the temperature-sensing material area; This indicates the number of pixels along the length of the temperature-sensitive material area; S306: Based on the number of pixels in the width direction of the five binary region images after rotation, calculate the actual foot width using a proportional conversion formula to obtain the left foot width and right foot width; The formula is expressed as: ; ; In the formula: , This indicates the width of the left foot and the width of the right foot; , This represents the number of pixels in the width direction of the left and right foot ball areas; Indicates the preset actual width of the temperature-sensing material area; This indicates the number of pixels in the width direction of the temperature-sensing material area.
8. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 7, characterized in that: In step S4, the processing steps for determining the type of horizontal bow include: S401: Calculate the minimum bounding rectangle boundary of the binary image of the rotated foot region and obtain the bounding rectangle parameters; S402: Based on the circumscribed rectangle parameters, the forefoot region of the binary image of the foot region is cropped according to the height ratio as the transverse arch calculation region to obtain the transverse arch calculation region image; S403: Calculate the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image; S404: Calculate the transverse arch ratio based on the area of the transverse arch calculation region image and the area of the foot portion within the transverse arch calculation region image; The formula for calculating the transverse arch ratio is expressed as follows: ; In the formula: This represents the ratio of the areas of the transverse arches; This represents the area of the foot portion within the cross-arch calculation region; This represents the total area of the calculation region for the horizontal bow; S405: Determine the type of bow based on the bow ratio.
9. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 1, characterized in that: In step S4, the processing steps for determining the longitudinal bow type include: S411: Divide the rotated binary image of the foot region into three equal parts according to the height of the arch, to obtain three sub-region images of the forefoot, midfoot, and hindfoot. S412: Calculate the number of pixels in the three sub-region images of forefoot, midfoot, and hindfoot, calculate the area of the midfoot sub-region image, and calculate the total area of the three sub-regions of forefoot, midfoot, and hindfoot. S413: Calculate the longitudinal arch ratio based on the area of the midfoot sub-region image and the total area of the three sub-regions: forefoot, midfoot, and hindfoot. The formula for calculating the longitudinal bow ratio is as follows: ; In the formula: Indicates the longitudinal arch ratio; This represents the area of the midfoot sub-region image; This represents the total area of the forefoot, midfoot, and hindfoot sub-regions. S414: Determine the type of longitudinal bow based on the longitudinal bow ratio.
10. The method for calculating foot length and width and determining arch height using temperature-sensitive footprints as described in claim 1, characterized in that: Step S5, the processing steps for correcting the foot length and foot width data based on the tester's transverse arch type and longitudinal arch type include: S501: Determine the corresponding horizontal bow fraction and vertical bow fraction based on the horizontal bow type and the vertical bow type; S502: The foot arch quantification index is calculated based on the transverse arch score and the longitudinal arch score, combined with foot length and foot width data. The formula is expressed as: ; In the formula: Indicates the arch quantification index; , Indicate the fractions of the horizontal and vertical bows; , This represents foot length and foot width data; S503: Based on the foot arch quantification index, combined with the transverse arch score and longitudinal arch score, as well as foot length data and foot width data, calculate the foot length correction coefficient and foot width correction coefficient; The formula is expressed as: ; ; ; ; In the formula: , Indicates the foot length correction factor and the foot width correction factor; , Indicates the influence coefficients of the transverse bow and the longitudinal bow; S504: Correct the foot length data and foot width data based on the foot length correction coefficient and foot width correction coefficient respectively to obtain the corrected foot length data and foot width data; ; In the formula: , This indicates the corrected foot length and foot width data.