Method of selecting an article for covering a body part by processing the image of the body part
20180182123 ยท 2018-06-28
Inventors
Cpc classification
A43D1/025
HUMAN NECESSITIES
G06V10/763
PHYSICS
International classification
Abstract
A method of measuring the distance of two points of an object by processing the image of the object taken from the mobile phone. The image taken by the mobile phone should contain the object and a piece of a rectangular paper marked with a point on each corner. For example, the object (e.g., a human foot) stands on a piece of the rectangular paper which has a mark on each corner. The image taken by a mobile phone should contain the foot and at least three of the four marks. Likewise, a human standing against the wall aside with the marked paper and a hand pressing on the marked paper are all applicable to the method of measuring any two points in the image of the. The resulted distance of any two points can be used to obtain a correct size of foot or the like.
Claims
1. A method of measuring size of an object comprising the steps of: (1) using a mobile phone to take a picture of an object rested on a rectangular paper having four marks on four corners respectively to obtain an image of the object; (2) decreasing the size of the image and smoothing the image; (3) comparing the image with a predetermined value to filter out noise; (4) further comparing the image with an adaptive threshold to filter out noise; (5) using canny edge detection to make an edge of the image clearer; (6) calculating the number of contours of the mark wherein the number of the contours of the mark is six; (7) calculating the number of the marks in the image; (8) looping back to step (1) if the number of the marks is less than three; (9) labeling the three marks shown in the image as first, second, and third marks having a coordinate; (10) obtaining a fourth mark by applying extrapolation; (11) obtaining a location of the object in the three-dimensional space; (12) executing perspective transformation on the object to obtain a distance between any two points of the object in the image; (13) subjecting the image to Lab color space transformation; (14) resizing the image; (15) converting two-dimensional characteristics of the image into one-dimensional characteristic thereof; (16) running k-means clustering (k=3) to obtain cluster centers wherein color is classified as a first cluster of skin color, a second cluster of white, and a third cluster of background; (17) applying 1-nearest neighbor classifier on the cluster centers to classify new data into the clusters, and employing Asian color index (L:90, a:12, b:12) to obtain the number of the clusters; (18) binarizing the skin color of the image for converting the pixel image into a binary image wherein a distance between each pixel of the image and the nearest cluster center is defined as 255 and a distance between the same and the distal cluster center is defined as 0; (19) measuring length of the object and width thereof respectively; (20) executing perspective transformation on the object in the image; and (21) obtaining a correct size of the object.
2. The method of claim 1, further comprising a post having a fifth mark disposed thereon.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0006]
[0007]
[0008]
[0009]
[0010]
[0011]
[0012]
[0013]
[0014]
DETAILED DESCRIPTION OF THE INVENTION
[0015] Referring to
[0016] Referring to
[0017] (A1) using a mobile phone to take a picture of the foot of
[0018] (A2) decreasing the size of the image and smoothing the image;
[0019] (A3) comparing the image with a predetermined value to filter out noise and further comparing the image with an adaptive threshold to filter out noise in order to obtain a clearer image;
[0020] (A4) using canny edge detection to make an edge of the image clearer;
[0021] (A5) calculating the number of the contours of the mark 11 in which the number of the contours is six because there are six arrows in
[0022] (A6) calculating the number of the marks 11 in the image;
[0023] (A7) the flow chart going to a next step if the number of the marks 11 is three, otherwise the flow chart looping back to step (A1);
[0024] (A8) as shown in
[0025] (A9) obtaining location of the image in the three-dimensional space and executing perspective transformation to obtain a distance between any two points of the image;
[0026] (B1) subjecting the image to Lab color space transformation this is because RGB color space is low in identifying the skin color so that the skin color can be enhanced by using Lab color space;
[0027] (B2) resizing the image and converting two-dimensional characteristics of the image into one-dimensional characteristic thereof;
[0028] (B3) running k-means clustering (k=3) to obtain cluster centers specifically, color is classified as a first cluster of skin color, a second cluster of white, and a third cluster of background; and the number of the contours of the mark 11 is six;
[0029] (B4) obtaining the number of clusters and the cluster centers specifically, the 1-nearest neighbor classifier on the cluster centers obtained by k-means is applied to classify new data into the existing clusters, and Asian color index (L:90, a:12, b:12) is employed to obtain the number of clusters and the cluster centers;
[0030] (B5) binarizing the skin color of the image for converting a pixel image into a binary image, specifically, a distance between each pixel of the image and the nearest cluster center defined as 255 and a distance between the same and the distal cluster center defined as 0;
[0031] (B6) measuring the length of the foot (
[0032] (C1) executing perspective transformation on the foot in the image;
[0033] (C2) obtaining the correct size of the foot;
[0034] (D1) inputting the size of the foot into a shoes database stored with a plurality of different sizes and types of shoes; and
[0035] (D2) searching the shoes database to find a numbered shoe adapted to fit in with the foot.
[0036] It is envisaged by the invention that a manufacturer can produce a shoe adapted to fit in with the foot in compliance with the numbered shoe.
[0037] It is understood that the method of the invention can be applied to other personal articles such as clothes without departing from the scope of the invention.
[0038] Referring to
[0039] Referring to
[0040] Referring to
[0041] The invention has the advantages of quickly and correctly measuring a distance between any two points in an image taken by a mobile phone, obtaining a correct size of an article for covering the body part, and the measurement results can be automatically stored.
[0042] While the invention has been described in terms of preferred embodiments, those skilled in the art will recognize that the invention can be practiced with modifications within the spirit and scope of the appended claims.