CN116739973A - Shoe length determining method, device, equipment and storage medium - Google Patents

Shoe length determining method, device, equipment and storage medium Download PDF

Info

Publication number
CN116739973A
CN116739973A CN202310391014.XA CN202310391014A CN116739973A CN 116739973 A CN116739973 A CN 116739973A CN 202310391014 A CN202310391014 A CN 202310391014A CN 116739973 A CN116739973 A CN 116739973A
Authority
CN
China
Prior art keywords
shoe
image
length
sole
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310391014.XA
Other languages
Chinese (zh)
Inventor
郭晶赛
张奎
郭晓威
魏超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shizhuang Information Technology Co ltd
Original Assignee
Shanghai Shizhuang Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shizhuang Information Technology Co ltd filed Critical Shanghai Shizhuang Information Technology Co ltd
Priority to CN202310391014.XA priority Critical patent/CN116739973A/en
Publication of CN116739973A publication Critical patent/CN116739973A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/12Edge-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The invention discloses a method, a device, equipment and a storage medium for determining the length of shoes, which relate to the technical field of computers, and comprise the following steps: acquiring a sole image of the shoe to be tested based on the image acquisition device, and determining a sole contour image by performing image segmentation on the sole image; determining pixel coordinates of the length mark points in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark points to obtain actual coordinates of the length mark points; and determining the length of the shoe to be tested according to the actual coordinates of the length mark points. According to the technical scheme, the sole image is accurately obtained on the premise of not losing the shoe to be tested, after the sole outline image is determined according to the sole image, the pixel coordinates of the length mark points are determined in the sole outline image, the pixel coordinates are converted into the actual coordinates, the actual distance between the length mark points is further determined according to the actual coordinates of the length mark points, the actual distance is determined to be the length of the shoe to be tested, and accurate measurement of the length of the shoe to be tested is achieved.

Description

Shoe length determining method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for determining the length of shoes.
Background
With the development of the age, the development of the electronic commerce industry is rapid, the occupation ratio of people on the internet is higher and higher, and meanwhile, people pay more attention to the quality of the online shopping of shoes. During the course of a transaction, a quality inspector is typically required to inspect the footwear. Ensuring consistent size of the two shoes is particularly important in footwear quality testing.
In the prior art, the length of two shoes needs to be determined through manual measurement or a semi-automatic measurement device, and whether the sizes of the two shoes are consistent or not is determined through comparing the lengths of the two shoes. When the length of the shoe is determined based on manual measurement, a quality inspector takes the shoe out of the shoe box, and measures the sole through measuring tools such as a tape to determine the length of the shoe; when the length of the shoe is determined based on the semi-automatic measuring device, the baffle of the semi-automatic measuring device is pushed away so as to pull the spring of the baffle apart, the shoe is placed into the semi-automatic detecting device, the shoe is pressed tightly based on the baffle of the semi-automatic measuring device, and the length of the shoe is determined through the length measuring sensor of the semi-automatic measuring device.
The long-time manual measurement is easy to cause personnel fatigue and false measurement, and the manual measurement has lower efficiency and higher cost; the baffle of semi-automatic measuring device is at the in-process of fixed shoes, causes the sole to warp easily, and then leads to the length inaccuracy of shoes of measuring.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for determining the length of a shoe, which can accurately determine the length of the sole of the shoe to be tested without damaging the shoe to be tested.
In a first aspect, an embodiment of the present invention provides a method for determining a length of a shoe, including:
acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point;
and determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
The technical scheme of the embodiment of the invention provides a method for determining the length of shoes, which comprises the following steps: acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image; determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point; and determining the length of the shoe to be tested according to the actual coordinates of the length mark points. According to the technical scheme, the sole image of the shoe to be tested can be accurately obtained on the premise that the shoe to be tested is not lost on the premise that the image acquisition device arranged at the bottom of the transparent conveyor belt is used for acquiring the sole image of the shoe to be tested when the shoe to be tested reaches the top of the image acquisition device, the sole contour image obtained by dividing the more accurate sole image is more accurate and is more matched with the shoe to be tested, after the pixel coordinates of the length mark points are determined in the pixel coordinate system corresponding to the sole contour image, the pixel coordinates are subjected to coordinate transformation according to the reference matrix and the distortion matrix of the image acquisition device, the actual coordinates corresponding to the pixel coordinates are determined, the actual coordinates of the length mark points are obtained, the coordinate transformation is realized, the actual distance between the length mark points is determined as the length of the shoe to be tested, and the accurate measurement of the length of the shoe to be tested is realized.
Further, the image acquisition device is installed in the conveyer belt bottom, the conveyer belt is transparent conveyer belt, correspondingly, acquires the sole image of the shoes that awaits measuring based on the image acquisition device, includes:
when the transparent conveyor belt is determined to convey the shoe to be tested to the top of the image acquisition device, the sole image of the shoe to be tested is acquired based on the image acquisition device arranged at the bottom of the transparent conveyor belt.
Further, determining a sole contour image by image segmentation of the sole image, comprising:
inputting the sole image into a pre-trained image segmentation model so that the image segmentation model performs image segmentation on the sole image to obtain the sole contour image corresponding to the sole image.
Further, determining pixel coordinates of a length mark point in the sole contour image includes:
determining a minimum circumscribed rectangle of the sole outline in the sole outline image, and determining a first length mark point and a second length mark point in the minimum circumscribed rectangle;
and determining a first pixel coordinate corresponding to the first length calibration point and a second pixel coordinate corresponding to the second length calibration point.
Further, before performing coordinate conversion on the pixel coordinates of the length marker point based on the internal reference matrix and the distortion parameter of the image acquisition device, the method further includes:
and calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameters of the image acquisition device.
Further, calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameter of the image acquisition device, including:
calibrating the image acquisition device based on a Zhang Zhengyou calibration method, and determining the internal reference matrix and the distortion parameters of the image acquisition device, wherein the internal reference matrix comprises a first pixel interval, a second pixel interval, a first focal length parameter and a second focal length parameter, and the distortion parameters comprise a pitch angle, a tilt angle, a rotation angle, a first translation vector, a second translation vector and a third translation vector.
Further, performing coordinate transformation on the pixel coordinates of the length mark point based on the internal reference matrix and the distortion parameter of the image acquisition device to obtain actual coordinates of the length mark point, including:
determining a coordinate conversion formula of pixel coordinates and actual coordinates based on the internal reference matrix and the distortion parameters of the image acquisition device;
Performing coordinate conversion on the first pixel coordinates of the first length mark point based on the coordinate conversion formula to obtain first actual coordinates of the first length mark point;
and carrying out coordinate conversion on the second pixel coordinates of the second length mark point based on the coordinate conversion formula to obtain second actual coordinates of the second length mark point.
Further, determining the length of the shoe to be tested according to the actual coordinates of the length mark points, including:
and determining the length of the shoe to be tested according to the first actual coordinates of the first length mark points and the second actual coordinates of the second length mark points.
Further, the method further comprises the following steps:
inquiring in a standard shoe code table based on the length of the shoe to be tested, determining an actual standard shoe code corresponding to the length of the shoe to be tested, and determining the actual standard shoe code as the shoe code of the shoe to be tested, wherein the standard shoe code table comprises standard lengths corresponding to a plurality of standard shoe codes.
In a second aspect, an embodiment of the present invention further provides a device for determining a length of a shoe, including:
the acquisition module is used for acquiring a sole image of the shoe to be tested based on the image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
The conversion module is used for determining the pixel coordinates of the length mark points in the sole outline image, and carrying out coordinate conversion on the pixel coordinates of the length mark points based on the internal reference matrix and the distortion parameters of the image acquisition device to obtain the actual coordinates of the length mark points;
and the determining module is used for determining the length of the shoe to be tested according to the actual coordinates of the length marking points.
In a third aspect, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of determining a shoe length of any one of the first aspects.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions for performing the shoe length determination method of any one of the first aspects when executed by a computer processor.
In a fifth aspect, the present application provides a computer program product comprising computer instructions which, when run on a computer, cause the computer to perform the method of determining the length of a shoe as provided in the first aspect.
It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer readable storage medium may be packaged with the processor of the shoe length determining device or may be packaged separately from the processor of the shoe length determining device, which is not limited in the present application.
The description of the second, third, fourth and fifth aspects of the present application may refer to the detailed description of the first aspect; also, the advantageous effects described in the second aspect, the third aspect, the fourth aspect, and the fifth aspect may refer to the advantageous effect analysis of the first aspect, and are not described herein.
In the present application, the names of the above-mentioned shoe length determining means do not constitute a limitation on the devices or function modules themselves, which may appear under other names in a practical implementation. Insofar as the function of each device or function module is similar to that of the present application, it falls within the scope of the claims of the present application and the equivalents thereof.
These and other aspects of the application will be more readily apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic structural view of a shoe length determining system according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for determining a length of a shoe according to an embodiment of the present application;
FIG. 3 is a flowchart of another method for determining a length of a shoe according to an embodiment of the present application;
FIG. 4 is a schematic diagram of an image segmentation model according to an embodiment of the present application;
FIG. 5a is a sole image of a shoe to be tested obtained by the image obtaining device, FIG. 5b is a sole outline image of the shoe to be tested, and FIG. 5c is a schematic diagram of a minimum circumscribed rectangle of the sole outline in the sole outline image;
FIG. 6 is a calibration plate image of different calibration fields of view;
FIG. 7a is a diagram showing the relative relationship between the image coordinate system and the pixel coordinate system, FIG. 7b is a diagram showing the relative relationship between the camera coordinate system and the image coordinate system, and FIG. 7c is a diagram showing the relative relationship between the camera coordinate system and the world coordinate system;
Fig. 8 is a schematic structural view of a shoe length determining device according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The application is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present application are shown in the drawings.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms "first" and "second" and the like in the description and in the drawings are used for distinguishing between different objects or between different processes of the same object and not for describing a particular order of objects.
Furthermore, references to the terms "comprising" and "having" and any variations thereof in the description of the present application are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed but may optionally include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart depicts operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently, or at the same time. Furthermore, the order of the operations may be rearranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figures. The processes may correspond to methods, functions, procedures, subroutines, and the like. Furthermore, embodiments of the application and features of the embodiments may be combined with each other without conflict.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more.
Fig. 1 is a schematic structural diagram of a shoe length determining system according to an embodiment of the present application, where, as shown in fig. 1, the shoe length determining system includes a transparent conveyor belt, an image acquisition device and a computer device, the image acquisition device is installed at the bottom of the transparent conveyor belt, and the image acquisition device is connected with the computer device in a communication manner. And transmitting the shoe to be tested on the transparent conveyor belt, and when the shoe to be tested is determined to reach the top of the image acquisition device, acquiring a sole image of the shoe to be tested by the image acquisition device, and transmitting the sole image to computer equipment, wherein the computer equipment can determine the length of the shoe to be tested according to the sole image. In the process of acquiring the sole image of the shoe to be tested, the shoe length determining system cannot damage the shoe to be tested, and the sole image is processed and calculated through the computer equipment to determine the length of the shoe to be tested more accurately.
The method for determining the length of a shoe according to the present application will be described in more detail with reference to the system for determining the length of a shoe shown in fig. 1.
Fig. 2 is a flowchart of a method for determining a length of a shoe according to an embodiment of the present application, where the method may be performed by a device for determining a length of a shoe, and specifically includes the following steps:
Step 210, acquiring a sole image of the shoe to be tested based on the image acquisition device, and determining a sole contour image by performing image segmentation on the sole image.
As shown in fig. 1, the image acquisition device is installed at the bottom of the transparent conveyor belt, and when it is determined that the shoe to be tested reaches the top of the image acquisition device, the sole image of the shoe to be tested can be acquired based on the image acquisition device. When the sole image of the shoe to be tested is obtained based on the image obtaining device arranged at the bottom of the transparent conveyor belt, the shoe to be tested is not required to be fixed, and only the sole image of the shoe to be tested is obtained based on the image obtaining device when the shoe to be tested is conveyed to the top of the image obtaining device by the transparent conveyor belt, so that the sole image of the shoe to be tested is obtained based on the image obtaining device arranged at the bottom of the transparent conveyor belt, and the shoe to be tested is not damaged.
The sole image acquired by the image acquisition device not only comprises soles of the shoes to be detected, but also comprises other interference images in the view field of the image acquisition device, and in order to be convenient for determining the length of the shoes to be detected in the sole image, the sole image can be subjected to image segmentation to obtain sole contour images only comprising sole contours of the shoes to be detected. Specifically, the sole image can be input into a pre-trained image segmentation model, the image segmentation model can determine the image features corresponding to the sole image, and the sole image is subjected to accurate image segmentation based on the image features, so that the sole contour image corresponding to the sole image is obtained.
In the embodiment of the invention, the image acquisition device can accurately acquire the sole image of the shoe to be tested on the premise of not losing the shoe to be tested, the sole contour image obtained by dividing the more accurate sole image is also more accurate, the sole contour image is more matched with the shoe to be tested, and the length of the shoe to be tested determined based on the more accurate sole contour image is also more accurate.
And 220, determining pixel coordinates of the length mark points in the sole outline image, and performing coordinate conversion on the pixel coordinates of the length mark points based on the internal reference matrix and the distortion parameters of the image acquisition device to obtain actual coordinates of the length mark points.
The length mark point may be understood as an intersection point of a minimum bounding rectangle of the sole contour and a toe and a heel of the sole contour in the sole contour image, and thus the length mark point may include a first length mark point determined by an intersection point of the minimum bounding rectangle of the sole contour and the toe of the sole contour and a second length mark point determined by an intersection point of the minimum bounding rectangle of the sole contour and the heel of the sole contour.
Specifically, the origin of the pixel coordinate system may be any pixel point in the sole contour image, and the origin of the pixel coordinate system may be used as a reference to determine the pixel coordinates of other pixel points in the sole contour image. Thus, the pixel coordinates of the first length marking point and the second length marking point in the sole contour image may be determined. Further, a conversion relation between pixel coordinates and actual coordinates is determined based on distortion parameters of an internal reference matrix of the image acquisition device, and the pixel coordinates of the first length mark point and the second length mark point are converted into actual coordinates, so that the actual coordinates of the first length mark point and the second length mark point are obtained.
In the embodiment of the invention, after the pixel coordinates of the length mark points are determined in the pixel coordinate system corresponding to the sole outline image, the pixel coordinates are subjected to coordinate transformation according to the internal reference matrix and the distortion matrix of the image acquisition device, the actual coordinates corresponding to the pixel coordinates are determined, the actual coordinates of the length mark points are obtained, and the coordinate transformation is realized.
And 230, determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
Specifically, the length mark points include a first length mark point determined by an intersection of a minimum bounding rectangle of the sole contour in the sole contour image and a toe of the sole contour, and a second length mark point determined by an intersection of a minimum bounding rectangle of the sole contour in the sole contour image and a toe of the sole contour. After the actual coordinates of the first length mark point and the second length mark point are determined, the actual distance between the first length mark point and the second length mark point can be determined according to the actual coordinates of the first length mark point and the second length mark point, and the distance between the intersection point of the minimum circumscribed rectangle of the sole contour in the sole contour image and the toe of the sole contour and the intersection point of the minimum circumscribed rectangle of the sole contour in the sole contour image and the shoe tail of the sole contour can be determined. The distance between the intersection point of the minimum circumscribed rectangle of the sole contour in the sole contour image and the toe of the sole contour and the intersection point of the minimum circumscribed rectangle of the sole contour in the sole contour image and the tail of the sole contour can be understood as the length of the sole, and therefore, the actual distance between the first length mark point and the second length mark point can be determined as the length of the shoe to be measured.
In the embodiment of the invention, after the actual coordinates of the length mark points are determined, the actual distance between the length mark points can be determined, and the actual distance between the length mark points is determined as the length of the shoe to be measured, so that the accurate measurement of the length of the shoe to be measured is realized.
The method for determining the length of the shoe provided by the embodiment of the invention comprises the following steps: acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image; determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point; and determining the length of the shoe to be tested according to the actual coordinates of the length mark points. According to the technical scheme, the sole image of the shoe to be tested can be accurately obtained on the premise that the shoe to be tested is not lost on the premise that the image acquisition device arranged at the bottom of the transparent conveyor belt is used for acquiring the sole image of the shoe to be tested when the shoe to be tested reaches the top of the image acquisition device, the sole contour image obtained by dividing the more accurate sole image is more accurate and is more matched with the shoe to be tested, after the pixel coordinates of the length mark points are determined in the pixel coordinate system corresponding to the sole contour image, the pixel coordinates are subjected to coordinate transformation according to the reference matrix and the distortion matrix of the image acquisition device, the actual coordinates corresponding to the pixel coordinates are determined, the actual coordinates of the length mark points are obtained, the coordinate transformation is realized, the actual distance between the length mark points is determined as the length of the shoe to be tested, and the accurate measurement of the length of the shoe to be tested is realized.
Fig. 3 is a flowchart of another method for determining a length of a shoe according to an embodiment of the present invention, which is embodied based on the above embodiment. As shown in fig. 3, in this embodiment, the method may further include:
step 310, acquiring a sole image of the shoe to be tested based on the image acquisition device.
In one embodiment, step 310 may specifically include:
when the transparent conveyor belt is determined to convey the shoe to be tested to the top of the image acquisition device, the sole image of the shoe to be tested is acquired based on the image acquisition device arranged at the bottom of the transparent conveyor belt.
As shown in fig. 1, the image acquisition device is mounted at the bottom of a conveyor belt, which is a transparent conveyor belt. Considering that the shoe sole is more fixed than the vamp form, and the vamp is easily influenced by shoelaces, trademarks, hangtags and the like, when the contour image is determined based on the vamp image of the shoe to be detected, the image segmentation difficulty is high, and the accurate contour image corresponding to the vamp image is difficult to obtain. Therefore, the sole image of the shoe to be tested, which is acquired based on the image acquisition device arranged at the bottom of the transparent conveyor belt, is used for determining the length of the shoe to be tested, so that the determined length of the shoe to be tested can be more accurate.
The image acquisition device can be an industrial camera, the industrial camera adopts a fixed Jiao Gaoqing camera, and the inner and outer parameters of the industrial camera are fixed after the industrial camera is arranged at the bottom of the transparent conveyor belt. When the transparent conveyor belt reaches the top of the image acquisition device, a preset area in the transparent conveyor belt can be a photographing area, the middle of the photographing area is divided by a dotted line, and left shoes and right shoes can be respectively placed on two sides of the dotted line.
Specifically, the shoe length determining system may further include a sensing device, which may be disposed in the photographing region, for determining whether the shoe to be tested reaches the photographing region. When the transparent conveyor belt conveys the shoes to be tested, the sensing device can determine whether the shoes to be tested reach the top of the image acquisition device, namely, whether the shoes to be tested reach the photographing area or not can be determined, and when the shoes to be tested reach the photographing area, an arrival signal is sent to the image acquisition device. When the image acquisition device receives the arrival signal, the transparent conveyor belt can be determined to convey the shoe to be detected to the top of the image acquisition device, namely the transparent conveyor belt can convey the shoe to be detected to the photographing area, and at the moment, the image acquisition device can photograph the photographing area to acquire the sole image of the shoe to be detected.
In the embodiment of the invention, the sole image used for determining the sole contour image is obtained, and the sole contour image is used for determining the length of the shoe to be tested, so that the obtained sole image of the shoe to be tested provides an accurate data basis for determining the length of the shoe to be tested.
Step 320, determining a sole contour image by image segmentation of the sole image.
In one embodiment, step 320 may specifically include:
inputting the sole image into a pre-trained image segmentation model so that the image segmentation model performs image segmentation on the sole image to obtain the sole contour image corresponding to the sole image.
Fig. 4 is a schematic diagram of an image segmentation model provided in an embodiment of the present invention, where the image segmentation model includes a dual-channel trunk, an aggregation layer, and a boosting portion, and as shown in fig. 4, the dual-channel trunk includes a detail branch and a semantic branch, the detail branch has a wide channel and a shallow layer, and is used for acquiring low-level features and generating a high-resolution feature representation, and the semantic branch has a narrow channel and a deep layer, and is used for acquiring high-level features. The numbers within the cube in the dual channel backbone represent the ratio of feature map size to input resolution. The feature representations of the detail branches and the semantic branches are complementary, and the bilateral guided aggregation layer can fuse the features of the detail branches and the features of the semantic branches and further segment the image based on the fused features to obtain a contour image. The boosting part of the image segmentation model is used for model training of the image segmentation model.
In practical applications, model training of the image segmentation model to be trained is required before image segmentation of the sole image based on the image segmentation model. And obtaining a large number of sole images and sole contour images as a training data set to perform model training on the image segmentation model to be trained, wherein the image segmentation model subjected to model training can be used for segmenting the sole images to determine the sole contour images corresponding to the sole images.
Fig. 5a is a sole image of a shoe to be tested obtained by the image obtaining device, fig. 5b is a sole contour image of the shoe to be tested, and as shown in fig. 5a, the sole image of the shoe to be tested not only includes the shoe to be tested but also includes an interfering object, in order to determine the length of the shoe to be tested in the sole image, the sole image may be subjected to image segmentation, so as to obtain the sole contour image of the shoe to be tested shown in fig. 5 b. The sole image is used as input information to be input into a pre-trained image segmentation model, the image segmentation model can determine detail features and semantic features corresponding to the sole image, the detail features and the semantic features are fused to obtain image features, and the sole image can be accurately segmented based on the image features to obtain a sole contour image corresponding to the sole image.
In the embodiment of the invention, the sole contour image obtained by dividing the sole image avoids the influence of the photographing area environment on the determination of the length of the shoe to be measured, the sole contour image is more matched with the sole of the shoe to be measured, and the length of the shoe to be measured determined based on the sole contour image is more accurate.
Step 330, determining pixel coordinates of the length mark points in the sole contour image.
In one embodiment, step 330 may specifically include:
determining a minimum circumscribed rectangle of the sole outline image, and determining a first length mark point and a second length mark point in the minimum circumscribed rectangle; and determining a first pixel coordinate corresponding to the first length calibration point and a second pixel coordinate corresponding to the second length calibration point.
Specifically, the sole contour in the sole contour image is selected by framing, and the minimum circumscribing rectangle corresponding to the sole contour image is determined, and fig. 5c is a schematic diagram of the minimum circumscribing rectangle of the sole contour in the sole contour image, as shown in fig. 5c, where the minimum circumscribing rectangle intersects with the widest part of the toe cap, the heel tail and the forefoot of the sole contour in the sole contour image. When the length of the shoe to be measured is determined, the intersection point of the minimum circumscribed rectangle and the toe and the tail of the sole outline in the sole outline image is required to be used, so that the intersection point of the minimum circumscribed rectangle and the toe and the tail of the sole outline in the sole outline image can be determined to be a first length mark point and a second length mark point. And constructing a pixel coordinate system by taking any pixel point in the sole outline image as an origin, and determining a first pixel coordinate corresponding to the first length mark point and a second pixel coordinate corresponding to the second length mark point in the pixel coordinate system.
For example, when the image resolution of the sole contour image is 1024×768, the number of columns of the pixel matrix constituting the sole contour image is 1024 and the number of rows is 768. And establishing a pixel coordinate system u-v taking pixels as units by taking the upper left corner of the sole contour image as an origin O1, wherein the u axis takes the direction of increasing the number of lines as a positive direction, and the v axis takes the direction of increasing the number of columns as a positive direction. The first pixel coordinate corresponding to the first length mark point may be determined as (u 1, v 1), the second pixel coordinate corresponding to the second length mark point may be determined as (u 2, v 2), and the abscissa and the ordinate respectively represent the number of rows and the number of columns where the length mark point is located in the pixel matrix.
In the embodiment of the invention, the first length mark point and the second length mark point for determining the sole length are determined by determining the minimum circumscribed rectangle of the sole outline in the sole outline image, so that the first pixel coordinate corresponding to the first length mark point and the second pixel coordinate corresponding to the second length mark point can be determined in the sole outline image.
And step 340, calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameters of the image acquisition device.
In one embodiment, step 340 may specifically include:
And calibrating the image acquisition device based on a Zhang Zhengyou calibration method, and determining the internal reference matrix and the distortion parameters of the image acquisition device.
The internal reference matrix comprises a first pixel interval sx, a second pixel interval sy, a first focal length parameter fx and a second focal length parameter fy, wherein sx represents a pixel value represented by a length of 1 millimeter on an x-direction axis, sy represents a pixel value represented by a length of 1 millimeter on a y-direction axis, fx=fsx, fy=fsy, and F is a physical focal length of the image acquisition device; the distortion parameters include a rotation matrix R including pitch angle, tilt angle, and rotation angle, and a translation matrix T including a first translation vector, a second translation vector, and a third translation vector. Thus, the parameters that the image acquisition device needs to calibrate include four internal parameters and six external parameters.
Specifically, the number of parameters required to be calibrated by the image acquisition device is 10, so that for each calibration view field, 10 parameters are required to be solved, and in the process of solving the parameters, a plane reference object is required to be selected to complete the calibration work. The planar reference may be a square black and white checkerboard, which may more easily determine the world coordinates of each corner point. The 6 external parameters under different calibration fields of view change, and two additional parameters used for solving the internal parameter matrix in the calibration fields of view need constraint. Thus, in one nominal field of view, 8 parameters can be fixed. It is known that solving all 10 parameters requires at least two calibration fields of view, i.e. two viewing angles.
When the square black-and-white checkerboard comprises N corner points and checkerboard images corresponding to K different calibration fields of view, 2NK constraints can be provided. Neglecting the distortion parameters each time, there are now 4 inner parameters and 6 outer parameters (6 parameters needed to find the checkerboard position in every K calibration fields of view). The precondition that the parameter solving equation is solved is that the number of constraint conditions is greater than or equal to the number of unknown parameters, namely 2NK is more than or equal to 6K+4. Also, because a square black and white checkerboard is used to scale the homography matrix for each field of view image, K >1. To represent all targets of the nominal field of view, 4 points are required, and a homography matrix can produce 8 parameters from 4 sets of (x, y) coordinate pairs. Therefore, no matter how many corner points are detected, only 4 useful corner point information can be obtained. For the square black-and-white checkerboard of 3*3 (only the internal corner points are calculated), at least two calibration fields of view are required for calibrating the image acquisition device, and in view of noise and numerical stability requirements, in practical use, in order to obtain a high-quality result, the image acquisition device can be calibrated by using 9 calibration plate images with different calibration fields of view shown in fig. 6.
In the embodiment of the invention, the calibration of the internal parameters and the external parameters of the image acquisition device is realized, and the internal parameter matrix and the distortion parameters are obtained.
And 350, performing coordinate conversion on pixel coordinates of the length mark points based on the internal reference matrix and the distortion parameters of the image acquisition device to obtain actual coordinates of the length mark points.
In one embodiment, step 350 may specifically include:
determining a coordinate conversion formula of pixel coordinates and actual coordinates based on the internal reference matrix and the distortion parameters of the image acquisition device; performing coordinate conversion on the first pixel coordinates of the first length mark point based on the coordinate conversion formula to obtain first actual coordinates of the first length mark point; and carrying out coordinate conversion on the second pixel coordinates of the second length mark point based on the coordinate conversion formula to obtain second actual coordinates of the second length mark point.
In the actual image acquisition process, the sole of the shoe to be tested is finally converted into two-dimensional information in a pixel coordinate system from three-dimensional information in a world coordinate system.
The image coordinate system takes the center of a projection image (photosensitive element) as an origin, namely takes the intersection point of an optical axis and an imaging plane as an origin O2, the x axis is parallel to the u axis of the pixel coordinate system, the y axis is parallel to the v axis of the pixel coordinate system, and coordinates in the image coordinate system are expressed by (x, y). The relative relationship of the image coordinate system and the pixel coordinate system is shown in fig. 7 a. The coordinates of the origin O2 of the image coordinate system in the pixel coordinate system are (u 0, v 0), and thus the relationship of the image coordinate system and the pixel coordinate system can be determined as in equation 1.
Where dx represents the physical length of the pixel in the u-axis, dy represents the physical length of the pixel in the v-axis, and the matrix form of equation 1 is shown in equation 2.
The camera coordinate system is a coordinate system established by taking the image acquisition device as an origin, and the camera coordinate system takes the optical center (projection center) of the image acquisition device as an origin O3 and X C Axes and Y C The axis is parallel to the x-axis and the y-axis of the image plane coordinate system, Z C The axis is the optical axis of the image acquisition device and the plane of the imageVertical, the coordinates in the camera coordinate system (X C ,Y C ,Z C ) And (3) representing. The intersection point of the optical axis of the image acquisition device and the plane of the image is the origin O2 of an image coordinate system, and the vertical distance from the camera coordinate system to the plane of the image is the focal length F of the image acquisition device. In practical situations, because the center of projection is not necessarily at the center of the plane in which the image is located due to the manufacturing process of the image acquisition device, two projection offset parameters may be introduced. The cx and cy individual pixels are not necessarily square but may be rectangular, for which purpose a first focal length parameter fx and a second focal length parameter fy are introduced. The relative relationship between the camera coordinate system and the image coordinate system is shown in fig. 7b, and the relationship between the camera coordinate system and the image coordinate system can be determined as shown in formula 3.
The matrix form of equation 3 is shown in equation 4.
The world coordinate system is used for describing the positions of the image acquisition device and the target point in the world space, the origin O4 of the world coordinate system can be at any position in the space, in order to be able to directly combine the world coordinate system with the measured distance, the numerical projection of the origin of the camera coordinate system can be used as the origin of the world coordinate system, and the coordinates in the world coordinate system can be used (X W ,Y W ,Z W ) And (3) representing. The relative relationship between the camera coordinate system and the world coordinate system is shown in fig. 7c, and the relationship between the world coordinate system and the camera coordinate system can be determined as shown in formula 5.
Wherein R is a rotation matrix formed by pitch angle, inclination angle and rotation angle, and T is a translation vector formed by a first translation vector, a second translation vector and a third translation vector.
Equation 6 can be deduced from the foregoing equations 1-5.
Based on equation 6, after knowing the pixel coordinates of the target point in the pixel coordinate system, the actual coordinates of the target point in the world coordinate system can be determined. That is, after determining that the first pixel coordinate corresponding to the first length mark point is (u 1, v 1) according to the aforementioned step 330, the coordinate conversion may be performed on (u 1, v 1) based on equation 6 to determine that the first actual coordinate corresponding to the first length mark point is (X) W1 ,Y W1 ,Z W1 ) After determining that the second pixel coordinate corresponding to the second length mark point is (u 2, v 2), it may be determined that the coordinate conversion of (u 2, v 2) based on equation 6 is performed, and the second actual coordinate corresponding to the second length mark point is (X) W2 ,Y W2 ,Z W2 )。
In the embodiment of the invention, after the first pixel coordinate corresponding to the first length mark point and the second pixel coordinate corresponding to the second length mark point are determined, the first pixel coordinate corresponding to the first length mark point can be subjected to left conversion based on the conversion relation between the pixel coordinate system and the world coordinate system to obtain the first world coordinate corresponding to the first length mark point, and the second pixel coordinate corresponding to the second length mark point can be subjected to left conversion to obtain the second world coordinate corresponding to the second length mark point.
And step 360, determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
In one embodiment, step 360 may specifically include:
and determining the length of the shoe to be tested according to the first actual coordinates of the first length mark points and the second actual coordinates of the second length mark points.
In particular, a first actual coordinate (X W1 ,Y W1 ,Z W1 ) And a second actual coordinate (X W2 ,Y W2 ,Z W2 ) Then, the distance between the first length mark point and the second length mark point in the world coordinate system, that is, the actual distance between the first length mark point and the second length mark point, may be determined based on equation 7.
Further, the actual distance between the first length marking point and the second length marking point may be determined as the length of the shoe to be tested.
In practical application, the lengths of the left shoe and the right shoe can be determined, and when the lengths of the left shoe and the right shoe in the same pair of shoes are consistent, the lengths of the pair of shoes are determined without errors.
In the embodiment of the invention, after the first actual coordinates of the first length mark point and the second actual coordinates of the second length mark point are determined, the actual distance between the first length mark point and the second length mark point can be determined, and the actual distance between the first length mark point and the second length mark point is determined as the length of the shoe to be measured, so that the accurate measurement of the length of the shoe to be measured is realized.
And 370, inquiring in a standard shoe code table based on the length of the shoe to be tested, determining an actual standard shoe code corresponding to the length of the shoe to be tested, and determining the actual standard shoe code as the shoe code of the shoe to be tested.
The standard shoe code table comprises a plurality of standard lengths corresponding to the standard shoe codes.
Specifically, after the length of the shoe to be tested is determined, the length of the shoe to be tested can be queried in a standard shoe code table, an actual standard shoe code corresponding to the length of the shoe to be tested is determined, and the actual standard shoe code is determined as the shoe code of the shoe to be tested, so that the shoe code of the shoe to be tested is determined.
In the embodiment of the invention, the size of the shoe to be measured is determined according to the length of the shoe to be measured, and the determined length of the shoe to be measured is more accurate, so that the size of the shoe to be measured determined according to the more accurate length of the shoe to be measured is also more accurate.
The method for determining the length of the shoe provided by the embodiment of the invention comprises the following steps: acquiring a sole image of the shoe to be tested based on the image acquisition device; determining a sole contour image by image segmentation of the sole image; determining pixel coordinates of length mark points in the sole contour image; calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameters of the image acquisition device; performing coordinate conversion on pixel coordinates of the length mark points based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark points; determining the length of the shoe to be tested according to the actual coordinates of the length mark points; inquiring in a standard shoe code table based on the length of the shoe to be tested, determining an actual standard shoe code corresponding to the length of the shoe to be tested, and determining the actual standard shoe code as the shoe code of the shoe to be tested. According to the technical scheme, the sole image of the shoe to be detected can be accurately obtained on the premise that the shoe to be detected is not lost on the premise that the image obtaining device arranged at the bottom of the transparent conveyor belt obtains the sole image of the shoe to be detected when the shoe to be detected reaches the top of the image obtaining device, the sole outline image obtained by dividing the more accurate sole image is more accurate and is more matched with the shoe to be detected, the first pixel coordinate of the first length mark point and the second pixel coordinate of the second length mark point can be determined in the pixel coordinate system corresponding to the sole outline image, the internal reference matrix and the external reference matrix of the image obtaining device are obtained through calibration of the internal reference matrix and the external reference matrix of the image obtaining device, coordinate transformation is carried out on the first pixel coordinate of the first length mark point and the second pixel coordinate of the second length mark point according to the internal reference matrix and the distortion matrix of the image obtaining device, the first actual coordinate corresponding to the first pixel coordinate of the first length mark point and the second actual coordinate corresponding to the second pixel coordinate of the second length mark point are determined, the first actual coordinate of the first length mark point and the second actual coordinate of the second length mark point can be determined, and the actual length between the first length mark point and the second length mark point can be determined, and the actual length between the first length mark point and the actual point and the second length mark point and the actual point can be measured. Of course, the length of the shoe to be tested can be queried in the standard shoe code table, the actual standard shoe code corresponding to the length of the shoe to be tested is determined, the actual standard shoe code is determined to be the shoe code of the shoe to be tested, and the determined length of the shoe to be tested is more accurate, so that the size of the shoe to be tested determined according to the more accurate length of the shoe to be tested is also more accurate.
Fig. 8 is a schematic structural diagram of a shoe length determining device according to an embodiment of the present invention, which is applicable to a case where it is required to accurately determine a sole length without damaging a shoe. The apparatus may be implemented in software and/or hardware and is typically integrated in a computer device.
As shown in fig. 8, the apparatus includes:
an acquisition module 810, configured to acquire a sole image of a shoe to be tested based on an image acquisition device, and determine a sole contour image by performing image segmentation on the sole image;
the conversion module 820 is configured to determine pixel coordinates of a length mark point in the sole contour image, and perform coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and a distortion parameter of the image acquisition device, so as to obtain actual coordinates of the length mark point;
and the determining module 830 is configured to determine the length of the shoe to be tested according to the actual coordinates of the length marking point.
According to the shoe length determining device provided by the embodiment, based on the image obtaining device, the sole image of the shoe to be tested is obtained, and the sole contour image is determined by carrying out image segmentation on the sole image; determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point; and determining the length of the shoe to be tested according to the actual coordinates of the length mark points. According to the technical scheme, the sole image of the shoe to be tested can be accurately obtained on the premise that the shoe to be tested is not lost on the premise that the image acquisition device arranged at the bottom of the transparent conveyor belt is used for acquiring the sole image of the shoe to be tested when the shoe to be tested reaches the top of the image acquisition device, the sole contour image obtained by dividing the more accurate sole image is more accurate and is more matched with the shoe to be tested, after the pixel coordinates of the length mark points are determined in the pixel coordinate system corresponding to the sole contour image, the pixel coordinates are subjected to coordinate transformation according to the reference matrix and the distortion matrix of the image acquisition device, the actual coordinates corresponding to the pixel coordinates are determined, the actual coordinates of the length mark points are obtained, the coordinate transformation is realized, the actual distance between the length mark points is determined as the length of the shoe to be tested, and the accurate measurement of the length of the shoe to be tested is realized.
On the basis of the above embodiment, the image capturing device is mounted at the bottom of a conveyor belt, where the conveyor belt is a transparent conveyor belt, and correspondingly, the capturing module 810 is specifically configured to:
when the transparent conveyor belt is determined to convey the shoe to be tested to the top of the image acquisition device, acquiring a sole image of the shoe to be tested based on the image acquisition device arranged at the bottom of the transparent conveyor belt; inputting the sole image into a pre-trained image segmentation model so that the image segmentation model performs image segmentation on the sole image to obtain the sole contour image corresponding to the sole image.
On the basis of the above embodiment, the device further includes:
and the calibration module is used for calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameters of the image acquisition device.
In one embodiment, the calibration module is specifically configured to:
calibrating the image acquisition device based on a Zhang Zhengyou calibration method, and determining the internal reference matrix and the distortion parameters of the image acquisition device, wherein the internal reference matrix comprises a first pixel interval, a second pixel interval, a first focal length parameter and a second focal length parameter, and the distortion parameters comprise a pitch angle, a tilt angle, a rotation angle, a first translation vector, a second translation vector and a third translation vector.
Based on the above embodiment, the conversion module 820 is specifically configured to:
determining a minimum circumscribed rectangle of the sole outline image, and determining a first length mark point and a second length mark point in the minimum circumscribed rectangle; determining a first pixel coordinate corresponding to the first length calibration point and a second pixel coordinate corresponding to the second length calibration point; determining a coordinate conversion formula of pixel coordinates and actual coordinates based on the internal reference matrix and the distortion parameters of the image acquisition device; performing coordinate conversion on the first pixel coordinates of the first length mark point based on the coordinate conversion formula to obtain first actual coordinates of the first length mark point; and carrying out coordinate conversion on the second pixel coordinates of the second length mark point based on the coordinate conversion formula to obtain second actual coordinates of the second length mark point.
Based on the above embodiment, the determining module 830 is specifically configured to:
and determining the length of the shoe to be tested according to the first actual coordinates of the first length mark points and the second actual coordinates of the second length mark points.
On the basis of the above embodiment, the device further includes:
The size determining module is used for inquiring in the standard shoe code table based on the length of the shoe to be tested, determining an actual standard shoe size corresponding to the length of the shoe to be tested, and determining the actual standard shoe size as the shoe size of the shoe to be tested, wherein the standard shoe code table comprises standard lengths corresponding to a plurality of standard shoe sizes.
The shoe length determining device provided by the embodiment of the invention can execute the shoe length determining method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the shoe length determining method.
It should be noted that, in the embodiment of the shoe length determining apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Fig. 9 shows a block diagram of an exemplary computer device 9 suitable for use in implementing embodiments of the invention. The computer device 9 shown in fig. 9 is only an example and should not be construed as limiting the functionality and scope of use of the embodiments of the invention.
As shown in fig. 9, the computer device 9 is in the form of a general purpose computing electronic device. The components of the computer device 9 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 9 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 9 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 9 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 9, commonly referred to as a "hard disk drive"). Although not shown in fig. 9, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 9 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 9, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 9 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, the computer device 9 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown in fig. 9, the network adapter 20 communicates with other modules of the computer device 9 via the bus 18. It should be appreciated that although not shown in fig. 9, other hardware and/or software modules may be used in connection with the computer device 9, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and page displays by running programs stored in the system memory 28, for example, implementing the shoe length determination method provided by the present embodiment, the method includes:
acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point;
and determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
Of course, those skilled in the art will appreciate that the processor may also implement the technical solution of the method for determining a length of a shoe provided by any embodiment of the present invention.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method for determining a length of a shoe, for example, provided by the embodiment of the present invention, the method comprising:
acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
Determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point;
and determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
In addition, the technical scheme of the invention can acquire, store, use, process and the like the data, which accords with the relevant regulations of national laws and regulations.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (12)

1. A method of determining a length of a shoe, comprising:
acquiring a sole image of the shoe to be tested based on an image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
determining pixel coordinates of a length mark point in the sole contour image, and performing coordinate conversion on the pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point;
and determining the length of the shoe to be tested according to the actual coordinates of the length mark points.
2. The shoe length determination method according to claim 1, wherein the image acquisition device is mounted at a bottom of a conveyor belt, the conveyor belt being a transparent conveyor belt, and the acquiring of the sole image of the shoe to be tested based on the image acquisition device correspondingly comprises:
when the transparent conveyor belt is determined to convey the shoe to be tested to the top of the image acquisition device, the sole image of the shoe to be tested is acquired based on the image acquisition device arranged at the bottom of the transparent conveyor belt.
3. The shoe length determination method according to claim 1, wherein determining a sole profile image by image segmentation of the sole image comprises:
Inputting the sole image into a pre-trained image segmentation model so that the image segmentation model performs image segmentation on the sole image to obtain the sole contour image corresponding to the sole image.
4. The shoe length determination method according to claim 1, wherein determining pixel coordinates of length mark points in the sole profile image includes:
determining a minimum circumscribed rectangle of the sole outline in the sole outline image, and determining a first length mark point and a second length mark point in the minimum circumscribed rectangle;
and determining a first pixel coordinate corresponding to the first length calibration point and a second pixel coordinate corresponding to the second length calibration point.
5. The shoe length determination method according to claim 1, further comprising, before performing coordinate conversion on pixel coordinates of the length mark points based on an internal matrix and distortion parameters of the image acquisition device:
and calibrating the image acquisition device to obtain the internal reference matrix and the distortion parameters of the image acquisition device.
6. The shoe length determination method according to claim 5, wherein calibrating the image acquisition device to obtain the reference matrix and the distortion parameters of the image acquisition device comprises:
Calibrating the image acquisition device based on a Zhang Zhengyou calibration method, and determining the internal reference matrix and the distortion parameters of the image acquisition device, wherein the internal reference matrix comprises a first pixel interval, a second pixel interval, a first focal length parameter and a second focal length parameter, and the distortion parameters comprise a pitch angle, a tilt angle, a rotation angle, a first translation vector, a second translation vector and a third translation vector.
7. The shoe length determination method according to claim 4, wherein performing coordinate conversion on pixel coordinates of the length mark point based on an internal reference matrix and distortion parameters of the image acquisition device to obtain actual coordinates of the length mark point comprises:
determining a coordinate conversion formula of pixel coordinates and actual coordinates based on the internal reference matrix and the distortion parameters of the image acquisition device;
performing coordinate conversion on the first pixel coordinates of the first length mark point based on the coordinate conversion formula to obtain first actual coordinates of the first length mark point;
and carrying out coordinate conversion on the second pixel coordinates of the second length mark point based on the coordinate conversion formula to obtain second actual coordinates of the second length mark point.
8. The shoe length determination method according to claim 7, wherein determining the length of the shoe to be tested according to the actual coordinates of the length mark points comprises:
and determining the length of the shoe to be tested according to the first actual coordinates of the first length mark points and the second actual coordinates of the second length mark points.
9. The shoe length determination method according to claim 1, further comprising:
inquiring in a standard shoe code table based on the length of the shoe to be tested, determining an actual standard shoe code corresponding to the length of the shoe to be tested, and determining the actual standard shoe code as the shoe code of the shoe to be tested, wherein the standard shoe code table comprises standard lengths corresponding to a plurality of standard shoe codes.
10. A shoe length determination apparatus, comprising:
the acquisition module is used for acquiring a sole image of the shoe to be tested based on the image acquisition device, and determining a sole contour image by carrying out image segmentation on the sole image;
the conversion module is used for determining the pixel coordinates of the length mark points in the sole outline image, and carrying out coordinate conversion on the pixel coordinates of the length mark points based on the internal reference matrix and the distortion parameters of the image acquisition device to obtain the actual coordinates of the length mark points;
And the determining module is used for determining the length of the shoe to be tested according to the actual coordinates of the length marking points.
11. A computer device, the computer device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the shoe length determination method of any one of claims 1-9.
12. A storage medium containing computer executable instructions for performing the shoe length determination method of any one of claims 1-9 when executed by a computer processor.
CN202310391014.XA 2023-04-11 2023-04-11 Shoe length determining method, device, equipment and storage medium Pending CN116739973A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310391014.XA CN116739973A (en) 2023-04-11 2023-04-11 Shoe length determining method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310391014.XA CN116739973A (en) 2023-04-11 2023-04-11 Shoe length determining method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116739973A true CN116739973A (en) 2023-09-12

Family

ID=87905132

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310391014.XA Pending CN116739973A (en) 2023-04-11 2023-04-11 Shoe length determining method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116739973A (en)

Similar Documents

Publication Publication Date Title
US10825198B2 (en) 3 dimensional coordinates calculating apparatus, 3 dimensional coordinates calculating method, 3 dimensional distance measuring apparatus and 3 dimensional distance measuring method using images
CN111210468B (en) Image depth information acquisition method and device
US9787960B2 (en) Image processing apparatus, image processing system, image processing method, and computer program
US7529387B2 (en) Placement information estimating method and information processing device
US7492357B2 (en) Apparatus and method for detecting a pointer relative to a touch surface
US20210192761A1 (en) Image depth estimation method and device, readable storage medium, and electronic apparatus
CN110689579A (en) Rapid monocular vision pose measurement method and measurement system based on cooperative target
JP2001524228A (en) Machine vision calibration target and method for determining position and orientation of target in image
JP2004127239A (en) Method and system for calibrating multiple cameras using calibration object
CN112825190B (en) Precision evaluation method, system, electronic equipment and storage medium
CN110260857A (en) Calibration method, device and the storage medium of vision map
US10552984B2 (en) Capture device calibration methods and systems
CN106570907B (en) Camera calibration method and device
US20180144497A1 (en) Information processing apparatus, method, and program
CN113034612A (en) Calibration device and method and depth camera
CN111311671B (en) Workpiece measuring method and device, electronic equipment and storage medium
CN114299156A (en) Method for calibrating and unifying coordinates of multiple cameras in non-overlapping area
CN113763478B (en) Unmanned vehicle camera calibration method, device, equipment, storage medium and system
CN113052912A (en) Camera calibration method and device
CN112102378A (en) Image registration method and device, terminal equipment and computer readable storage medium
CN116559181A (en) Defect detection method, system, device and medium based on luminosity stereoscopic vision
CN116739973A (en) Shoe length determining method, device, equipment and storage medium
CN116203976A (en) Indoor inspection method and device for transformer substation, unmanned aerial vehicle and storage medium
CN115546314A (en) Sensor external parameter calibration method and device, equipment and storage medium
CN114677367A (en) Detection method, detection device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination