WO2015120772A1 - 一种计算商品图像牛皮癣分值的方法和装置 - Google Patents
一种计算商品图像牛皮癣分值的方法和装置 Download PDFInfo
- Publication number
- WO2015120772A1 WO2015120772A1 PCT/CN2015/072115 CN2015072115W WO2015120772A1 WO 2015120772 A1 WO2015120772 A1 WO 2015120772A1 CN 2015072115 W CN2015072115 W CN 2015072115W WO 2015120772 A1 WO2015120772 A1 WO 2015120772A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- psoriasis
- product image
- pixel point
- score
- pixel
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/58—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
- G06F16/583—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/26—Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H30/00—ICT specially adapted for the handling or processing of medical images
- G16H30/20—ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/30—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for calculating health indices; for individual health risk assessment
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16Z—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS, NOT OTHERWISE PROVIDED FOR
- G16Z99/00—Subject matter not provided for in other main groups of this subclass
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H50/00—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
- G16H50/20—ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
Definitions
- the present application relates to the field of computer communication technologies, and in particular, to a method and apparatus for calculating a psoriasis score of a commodity image.
- the products displayed by the shopping website merchants generally use the real-life product images, but in many cases, in order to identify the brand, introduce the product or promote the promotion, some generated content will be added to the product image. These generated content may include words, trademarks or patterns, and the like.
- the generated content in the product image is generally only the auxiliary information of the product, which plays a supporting role. If the generated content exceeds the auxiliary role and affects the display of the commodity body, then it will cause harm. For convenience of explanation, such generated content may be beyond the auxiliary function, and the product image that affects the display of the commodity body is called a psoriasis image.
- the psoriasis score of the product image can be calculated, and whether the product image is a psoriasis image and the severity of psoriasis can be determined according to the psoriasis score, so that it can be determined according to whether the product image is a psoriasis image and the severity of psoriasis.
- Product image display is prohibited.
- the existing method for calculating the psoriasis score of the commodity image is as follows: obtaining a product image; extracting a psoriasis region block in the product image, wherein the psoriasis region block includes a text region block, a trademark region block, and a pattern region block; and calculating the number of psoriasis region blocks , area, location, and color; calculate the psoriasis score of the product image based on the number, area, location, and color of the psoriasis block.
- the existing method for calculating the psoriasis score of the product image calculates the psoriasis score of the product image according to the number, area, position and color of the psoriasis area block.
- the psoriasis score is not only related to the absolute position of the psoriasis block, but also The relative position between the psoriasis blocks, and the simple addition of the number and area of the psoriasis block does not represent the severity of psoriasis in the range and color range. Therefore, the products calculated by the existing methods are The image psoriasis score is not accurate enough to accurately determine whether the product image is a psoriasis image and the severity of psoriasis.
- the technical problem to be solved by the present application is to provide a method and a device for calculating a psoriasis score of a commodity image, which are calculated according to the positional relationship between each pixel point and a boundary pixel point and a psoriasis pixel point in the product image, and each pixel in the product image is calculated.
- the corresponding psoriasis cutting space area is calculated according to the psoriasis cutting space area corresponding to all the pixel points in the product image, and the psoriasis score of the product image is calculated, and the pixel point is the actual element of the product image, which can reflect the real condition of the product image and improve
- the accuracy of the psoriasis score of the product image can more accurately determine whether the product image is a psoriasis image and the severity of psoriasis.
- the present application discloses a method for calculating a psoriasis score of a commodity image, the method comprising:
- the psoriasis score of the product image is calculated according to the psoriasis cutting space area corresponding to all the pixel points in the product image.
- the first area block in the product image is extracted, and the pixel points located in the first area block are marked as psoriasis pixels, including:
- the pixel points of the first region block after expansion are marked as psoriasis pixels.
- calculating a psoriasis cutting space area corresponding to each pixel point in the product image according to a positional relationship between each pixel point in the product image and the boundary pixel point and the psoriasis pixel point including:
- Each pixel point in the product image is respectively used as a current pixel point
- the current pixel point is not the psoriasis pixel point, searching for the current pixel point horizontally to the left direction, the horizontal right direction, the vertical upward direction, and the vertical downward direction respectively, centering on the current pixel point
- the first psoriasis pixel or boundary pixel in the horizontal left direction, the horizontal right direction, the vertical upward direction, and the vertical downward direction are respectively used as the left boundary point, the right boundary point, and the upper point of the current pixel point Boundary point and lower boundary point;
- the psoriasis cutting space area corresponding to the current pixel point is obtained according to the width and height of the psoriasis cutting space area corresponding to the current pixel point.
- the method further includes:
- the current pixel point is the psoriasis pixel point, setting the psoriasis cutting space area corresponding to the current pixel point to be zero.
- calculating a psoriasis score of the product image according to the psoriasis cutting space area corresponding to all the pixel points in the product image including:
- the psoriasis score of the product image is calculated based on the sum of the weights of all the pixels in the product image and normalized.
- calculating a psoriasis score of the product image based on the summed and weighted values of all the pixels in the product image including:
- the psoriasis score of the commercial image is obtained.
- the method further includes:
- the severity of psoriasis of the commercial image is determined or classified.
- the first area block includes at least one of a text area block, a trademark area block, and a pattern area block.
- the present application also discloses an apparatus for calculating a psoriasis score of a commodity image, the apparatus comprising:
- An acquiring module configured to acquire an image of a product, record coordinates of each pixel in the product image, and mark a pixel located at a boundary of the product image as a boundary pixel;
- An extraction module configured to extract a first region block in the product image, and mark a pixel point located in the first region block as a psoriasis pixel, wherein the first region block includes a text region block and a trademark region At least one of a block and a pattern area block;
- a first calculating module configured to calculate a psoriasis cutting space area corresponding to each pixel point in the product image according to a positional relationship between each pixel point in the product image and the boundary pixel point and the psoriasis pixel point;
- the second calculating module is configured to calculate a psoriasis score of the product image according to a psoriasis cutting space area corresponding to all the pixel points in the product image.
- the extraction module includes:
- An extracting unit configured to extract a first area block in the product image
- An analyzing unit configured to analyze a color saliency of the first area block
- An expansion unit configured to expand the first area block according to a size of a color saliency of the first area block, to obtain the expanded first area block;
- a marking unit for marking a pixel point of the first region block after expansion as psoriasis pixel.
- the first calculation module includes:
- a first processing unit configured to use each pixel point in the product image as a current pixel point
- a determining unit configured to determine whether the current pixel point is the psoriasis pixel point
- a searching unit configured to: if the current pixel point is not the psoriasis pixel point, look up the current pixel point horizontally to the left direction, the horizontal right direction, the vertical direction, and The first psoriasis pixel or boundary pixel in the vertical downward direction;
- a second processing unit configured to use a first psoriasis pixel or a boundary pixel in a horizontal left direction, a horizontal right direction, a vertical upward direction, and a vertical downward direction as left boundaries of the current pixel point Point, right boundary point, upper boundary point and lower boundary point;
- a width obtaining unit configured to obtain, according to coordinates of the left boundary point and coordinates of the right boundary point, a width of a psoriasis cutting space area corresponding to the current pixel point;
- a height obtaining unit configured to obtain, according to coordinates of the upper boundary point and coordinates of the lower boundary point, a height of a psoriasis cutting space area corresponding to the current pixel point;
- An area obtaining unit configured to obtain a psoriasis cutting space area corresponding to the current pixel point according to a width and a height of a psoriasis cutting space area corresponding to the current pixel point.
- the first calculating module further includes:
- a setting unit configured to set the psoriasis cutting space area corresponding to the current pixel point to be zero if the current pixel point is the psoriasis pixel point.
- the second calculation module includes:
- a weight obtaining unit configured to use a psoriasis cutting space area corresponding to each pixel point in the product image, or a monotonically increasing function value of the psoriasis cutting space area corresponding to each pixel point greater than zero, as the product image The weight of each pixel in the middle;
- the score obtaining unit is configured to calculate a psoriasis score of the product image based on a sum obtained by weighting all the pixels in the product image and normalized.
- the score obtaining unit includes:
- a reference score obtaining subunit a value obtained by summing and normalizing weights of all pixel points in the product image as a psoriasis reference score of the product image;
- a score acquisition subunit is configured to obtain a psoriasis score of the product image according to the psoriasis reference score and the preset psoriasis score expression.
- the device further includes:
- a comparison module configured to compare the calculated psoriasis score of the product image with a preset psoriasis determination threshold or a psoriasis classification threshold;
- a determination or classification module for determining or classifying the severity of psoriasis of the product image based on the comparison result.
- the first area block includes at least one of a text area block, a trademark area block, and a pattern area block.
- the psoriasis cutting space area corresponding to each pixel point in the product image is calculated, and according to the psoriasis cutting space area corresponding to all the pixel points in the product image, Calculate the psoriasis score of the product image.
- the pixel is the actual element of the product image, which can reflect the real condition of the product image, improve the accuracy of the psoriasis score of the product image, and more accurately determine whether the product image is a psoriasis image. And the severity of psoriasis.
- the first area block is expanded to obtain the expanded first area block, so that a more accurate first area block can be obtained, which further improves the accuracy of the commodity image psoriasis score. Sex.
- FIG. 1 is a flow chart of a method for calculating a psoriasis score of a commodity image according to an embodiment of the present application
- FIG. 2 is a flow chart of a second method for calculating a psoriasis score of a product image according to an embodiment of the present application
- FIG. 3 is a schematic diagram of an article image of an embodiment of the present application.
- FIG. 4 is a schematic diagram of a first area block in a product image according to an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of an apparatus for calculating a psoriasis score of a product image according to an embodiment of the present application.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- the memory may include non-persistent memory, random access memory (RAM), and/or non-volatile memory in a computer readable medium, such as read only memory (ROM) or flash memory.
- RAM random access memory
- ROM read only memory
- Memory is an example of a computer readable medium.
- Computer readable media includes both permanent and non-persistent, removable and non-removable media.
- Information storage can be implemented by any method or technology.
- the information can be computer readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read only memory. (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, Magnetic tape cartridges, magnetic tape storage or other magnetic storage devices or any other non-transportable media can be used to store information that can be accessed by a computing device.
- computer readable media does not include non-transitory computer readable media, such as modulated data signals and carrier waves.
- FIG. 1 A flow chart of a method for calculating a psoriasis score of a commodity image, the method comprising:
- S101 Acquire an item image, record coordinates of each pixel in the product image, and mark a pixel located at a boundary of the product image as a boundary pixel.
- the product image may be an image of the product displayed in the shopping website merchant, or may be other similar images, which is not specifically limited.
- S102 extract a first area block in the product image, and mark a pixel point located in the first area block as a psoriasis pixel, wherein the first area block includes at least one of a text area block, a trademark area block, and a pattern area block.
- the first area block includes at least one of a text area block, a trademark area block, and a pattern area block.
- the method for extracting the first region block in the product image may be implemented by any method, which is not limited thereto.
- a texture statistics based method, a region analysis based method, or the like may be adopted for the text region block.
- the extracted original first region block may be expanded to obtain the expanded first region block, specifically, the first region block in the product image is extracted. Marking the pixels in the first block as psoriasis pixels, which may include:
- the pixel points of the expanded first region block are marked as psoriasis pixels.
- the color saliency of the first area block may be obtained by calculating the distance between the first area block and the surrounding background main color, or by calculating the distance between the first area block and the surrounding background main color saturation.
- the first region block is expanded, and the expansion method can adopt morphological expansion, and the expansion radius is proportional to the previously obtained color saliency.
- S103 Calculate a psoriasis cutting space area corresponding to each pixel point in the product image according to a positional relationship between each pixel point in the product image and the boundary pixel point and the psoriasis pixel point.
- the psoriasis cutting space area refers to an area of the product image that is not cut by psoriasis pixels around each pixel in the product image after being cut by the first area block.
- it can be implemented by various methods, such as a circle The form of the shape, the way of the rectangle, etc. are realized.
- you can find the center of each pixel as the center of the circle, and search for the radius from small to large. If the circular area of the radius does not contain boundary pixels and psoriasis pixels, then increase the radius to find it.
- the radius before the radius is used as a radius for calculating the area of the psoriasis cutting space, and the area of the psoriasis cutting space is calculated.
- the area of the psoriasis cutting space corresponding to each pixel point in the product image may be calculated, which may include :
- S103b Determine whether the current pixel is a psoriasis pixel. If the current pixel is not a psoriasis pixel, execute S103c; otherwise, execute S103h.
- S103c Locating the first psoriasis pixel or boundary pixel in the horizontal left direction, the horizontal right direction, the vertical upward direction, and the vertical downward direction of the current pixel point, centering on the current pixel point.
- the first psoriasis pixel point for example, the first psoriasis pixel point horizontally to the left of the current pixel point is taken as an example, and the current pixel point is centered, and the current pixel point is searched horizontally to the left.
- the first psoriasis pixel point if there is no psoriasis pixel point in the horizontal direction of the current pixel point, the boundary pixel point of the current pixel point to the left direction is finally found, and the other directions are similar, and will not be described one by one.
- S103d The first psoriasis pixel or boundary pixel in the horizontal left direction, the horizontal right direction, the vertical upward direction, and the vertical downward direction are respectively used as the left boundary point, the right boundary point, and the upper point of the current pixel point. Boundary point and lower boundary point.
- the difference between the coordinates of the right boundary point and the coordinates of the left boundary point is the width of the psoriasis cutting space area corresponding to the current pixel point.
- the difference between the coordinates of the lower boundary point and the coordinates of the upper boundary point is the height of the area of the psoriasis cutting space corresponding to the current pixel point.
- the product of the width and the height is the area of the psoriasis cutting space corresponding to the current pixel point.
- each pixel in the product image may be: As the current pixel point, starting from the current pixel point (ie, starting from the current pixel point itself, if the current pixel point itself is a psoriasis pixel point, then the horizontal left direction, the horizontal right direction, the vertical upward direction, and the vertical direction
- the first psoriasis pixel or boundary pixel in the straight downward direction is itself, and the corresponding area is zero), respectively searching for the current pixel horizontally to the left, horizontal to the right, vertical to the vertical, and vertically downward.
- the first psoriasis pixel or boundary pixel in the direction is itself, and the corresponding area is zero
- S104 Calculate the psoriasis score of the product image according to the psoriasis cutting space area corresponding to all the pixel points in the product image.
- the psoriasis score of the product image is calculated according to the area of the psoriasis cutting space corresponding to all the pixel points in the product image, including:
- the psoriasis cutting space area corresponding to each pixel point in the product image or the monotonically increasing function value of the psoriasis cutting space area corresponding to each pixel point being greater than zero, as the weight of each pixel point in the product image;
- the psoriasis score of the product image is calculated based on the sum of the weights of all the pixels in the product image and normalized.
- the monotonically increasing function of the psoriasis cutting space area corresponding to each pixel point being greater than zero may be a square function, a square root function, an exponential function, a logarithmic function, etc. of the psoriasis cutting space area corresponding to each pixel point.
- the weight and the highest case of all the pixels in the product image occur in the product image.
- the psoriasis cutting space area corresponding to each pixel point in the product image is the area of the product image, and the weights of all the pixel points in the product image can be summed, and divided by all the pixel points in the product image.
- the weight and the highest value are normalized.
- the psoriasis score of the product image is calculated based on the sum of the weights of all the pixel points in the product image and normalized, including:
- the psoriasis score of the product image is obtained.
- the weights of all the pixels in the product image are summed and normalized to obtain a decimal value of 0 to 1, and the larger the value, the less likely the merchandise image is psoriasis image or the less severe psoriasis .
- the value can be used as the psoriasis reference score of the product image, and the psoriasis score expression can be set to the percentage system (or other), and the larger the psoriasis score, the greater the possibility that the product image is a psoriasis image or
- the psoriasis reference score of 0 can be obtained corresponding to the psoriasis score of 100, the psoriasis reference score of 1 corresponding psoriasis score of 0, psoriasis reference points
- the psoriasis score corresponding to a value of 0.1 is 90 or the like.
- the psoriasis score is expressed as a percentage system, and the greater the psoriasis score, the greater the possibility that the commercial image is a psoriasis image or the more severe the psoriasis, as shown in Figure 3 and Figure 4, in the dotted box in Figure 4.
- the content is the first area block extracted from FIG. 3, and the psoriasis score of FIG. 3 is calculated to be 66 points by the method of the embodiment, and the figure 3 is determined or classified into the middle according to a preset determination or classification criterion. Degree psoriasis.
- the psoriasis score of the product image can be based on the meaning of the psoriasis score of the product image (the greater the psoriasis score, the less likely it is to be a psoriasis image or the less severe psoriasis, or the greater the psoriasis score, the more likely it is Psoriasis image or psoriasis is more serious), set the corresponding psoriasis determination threshold or psoriasis classification threshold, and calculate the psoriasis score of the calculated product image, compared with the preset psoriasis determination threshold or psoriasis classification threshold, according to the comparison result, the product The degree of psoriasis in the image is determined or classified.
- the comparison result is the calculated psoriasis score of the commercial image, which is greater than the preset psoriasis determination threshold or cow.
- the skin classification threshold When the skin classification threshold is used, the less likely the product image is the psoriasis image or the psoriasis; the comparison result is the calculated psoriasis score of the product image, less than or equal to the preset psoriasis determination threshold or the psoriasis classification threshold, the product image The more likely it is the psoriasis image or the more severe the psoriasis.
- the meaning of the psoriasis score is that the greater the psoriasis score is, the more likely the psoriasis image or psoriasis is, the more serious the judgment or classification of the psoriasis severity of the commercial image is based on the comparison result, and the details are not described herein.
- the method for calculating the psoriasis score of the commodity image calculates the psoriasis cutting space area corresponding to each pixel point in the product image according to the positional relationship between each pixel point and the boundary pixel point and the psoriasis pixel point in the product image. According to the psoriasis cutting space area corresponding to all the pixel points in the product image, the psoriasis score of the product image is calculated, and the pixel point is the actual element of the product image, which can reflect the real condition of the product image and improve the psoriasis score of the product image.
- Accuracy can more accurately determine whether the image of the product is a psoriasis image and the severity of psoriasis.
- the first area block is expanded to obtain the expanded first area block, so that a more accurate first area block can be obtained, which further improves the accuracy of the commodity image psoriasis score. Sex.
- FIG. 5 it is a structural diagram of a device for calculating a psoriasis score of a product image according to an embodiment of the present application, the device comprising:
- the obtaining module 201 is configured to acquire an image of a product, record coordinates of each pixel in the product image, and mark a pixel located at a boundary of the product image as a boundary pixel;
- the extracting module 202 is configured to extract a first area block in the product image, and mark the pixel point located in the first area block as a psoriasis pixel point;
- a first calculating module 203 configured to calculate a psoriasis cutting space area corresponding to each pixel point in the product image according to a positional relationship between each pixel point in the product image and the boundary pixel point and the psoriasis pixel point;
- the second calculating module 204 is configured to calculate a psoriasis score of the product image according to the psoriasis cutting space area corresponding to all the pixel points in the product image.
- the extraction module 202 comprises:
- An extracting unit configured to extract a first area block in the product image
- An analyzing unit configured to analyze a color saliency of the first area block
- An expansion unit configured to expand the first area block according to the size of the color saliency of the first area block, to obtain the expanded first area block
- a marking unit for marking a pixel point of the expanded first region block as a psoriasis pixel.
- the first calculating module 203 comprises:
- a first processing unit configured to use each pixel point in the product image as the current pixel point
- a determining unit configured to determine whether the current pixel point is a psoriasis pixel
- the searching unit is configured to: if the current pixel point is not a psoriatal pixel point, look at the current pixel point as the center, and respectively search for the current pixel point horizontally to the left direction, the horizontal right direction, the vertical upward direction, and the vertical downward direction respectively.
- a psoriasis pixel or boundary pixel
- a second processing unit configured to use a first psoriasis pixel or a boundary pixel in a horizontal left direction, a horizontal right direction, a vertical upward direction, and a vertical downward direction as the left boundary point of the current pixel point, Right boundary point, upper boundary point and lower boundary point;
- a width obtaining unit configured to obtain a width of a psoriasis cutting space area corresponding to the current pixel point according to the coordinates of the left boundary point and the coordinates of the right boundary point;
- a height obtaining unit configured to obtain a height of a psoriasis cutting space area corresponding to the current pixel point according to coordinates of the upper boundary point and coordinates of the lower boundary point;
- the area obtaining unit is configured to obtain a psoriasis cutting space area corresponding to the current pixel point according to the width and height of the psoriasis cutting space area corresponding to the current pixel point.
- the first calculating module 203 further includes:
- the setting unit is configured to set the psoriasis cutting space area corresponding to the current pixel point to be zero if the current pixel point is a psoriasis pixel point.
- the second calculation module 204 includes:
- a weight obtaining unit configured to convert a psoriasis cutting space area corresponding to each pixel point in the product image, or a monotonically increasing function of a psoriasis cutting space area corresponding to each pixel point greater than zero Value as the weight of each pixel in the product image;
- the score obtaining unit is configured to sum and normalize the weights of all the pixels in the product image as the psoriasis score of the product image.
- the score obtaining unit comprises:
- the reference score obtaining subunit is used for summing and normalizing the weights of all the pixels in the product image as the psoriasis reference score of the commodity image;
- the score acquisition subunit is used to obtain the psoriasis score of the product image according to the psoriasis reference score and the preset psoriasis score expression.
- the device further comprises:
- a comparison module for comparing the calculated psoriasis score of the commodity image with a preset psoriasis determination threshold or a psoriasis classification threshold;
- a determination or classification module for determining or classifying the severity of psoriasis of the product image based on the comparison result.
- the first area block includes at least one of a text area block, a trademark area block, and a pattern area block.
- the device for calculating the psoriasis score of the product image calculates the psoriasis cutting space area corresponding to each pixel point in the product image according to the positional relationship between each pixel point in the product image and the boundary pixel point and the psoriasis pixel point. According to the psoriasis cutting space area corresponding to all the pixel points in the product image, the psoriasis score of the product image is calculated, and the pixel point is the actual element of the product image, which can reflect the real condition of the product image and improve the psoriasis score of the product image.
- Accuracy can more accurately determine whether the image of the product is a psoriasis image and the severity of psoriasis.
- the first area block is expanded to obtain the expanded first area block, so that a more accurate first area block can be obtained, which further improves the accuracy of the commodity image psoriasis score. Sex.
- the device corresponds to the foregoing method flow description, and the deficiencies refer to the description of the above method flow, and will not be further described.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Medical Informatics (AREA)
- Public Health (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Library & Information Science (AREA)
- General Health & Medical Sciences (AREA)
- Primary Health Care (AREA)
- Epidemiology (AREA)
- General Engineering & Computer Science (AREA)
- Biomedical Technology (AREA)
- Pathology (AREA)
- Multimedia (AREA)
- Bioinformatics & Computational Biology (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Image Analysis (AREA)
Abstract
一种计算商品图像牛皮癣分值的方法和装置,属于计算机通信技术领域。所述方法包括:获取并记录所述商品图像中每个像素点的坐标,并将位于所述商品图像的边界的像素点标记为边界像素点(101);提取并将位于所述第一区域块的像素点标记为牛皮癣像素点(102);根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积(103);根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值(104)。所述装置包括:获取模块(201)、提取模块(202)、第一计算模块(203)和第二计算模块(204)。提高了商品图像牛皮癣分值的准确性。
Description
本申请涉及计算机通信技术领域,具体涉及一种计算商品图像牛皮癣分值的方法和装置。
随着计算机通信技术的发展,越来越多的商家选择通过购物网站销售商品。购物网站商家展示的商品,一般都会采用实拍的商品图像,但是很多时候,为了标识品牌、介绍商品或者宣传促销,会在商品图像上增加一些生成内容。这些生成内容可以包括文字、商标或图案等。商品图像中的生成内容一般只是商品的辅助信息,起辅助作用。如果生成内容超出了辅助作用,影响了商品主体的展示,那么就会产生危害。为了便于说明,可以把这类生成内容超出了辅助作用,影响了商品主体的展示的商品图像称为牛皮癣图像。为了保证良好的网络购物环境,可以计算商品图像的牛皮癣分值,根据牛皮癣分值判断商品图像是否是牛皮癣图像以及牛皮癣严重程度,从而可以根据商品图像是否是牛皮癣图像以及牛皮癣严重程度,来确定是否禁止商品图像展示。
现有计算商品图像牛皮癣分值的方法如下:获取商品图像;提取商品图像中的牛皮癣区域块,其中,牛皮癣区域块包括文字区域块、商标区域块和图案区域块;计算牛皮癣区域块的个数、面积、位置和颜色;根据牛皮癣区域块的个数、面积、位置和颜色,计算商品图像的牛皮癣分值。
现有计算商品图像牛皮癣分值的方法,根据牛皮癣区域块的个数、面积、位置和颜色,计算商品图像的牛皮癣分值,然而,牛皮癣分值不只与牛皮癣区域块的绝对位置有关,还与牛皮癣区域块之间的相对位置有关,而且通过对牛皮癣区域块的个数和面积的简单相加,并不能代表该位置范围和颜色范围内牛皮癣的严重程度,因此,现有方法计算得到的商品图像牛皮癣分值不够准确,无法准确判断出商品图像是否是牛皮癣图像以及牛皮癣严重程度。
发明内容
本申请所要解决的技术问题在于提供一种计算商品图像牛皮癣分值的方法和装置,通过根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积,根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值,像素点是商品图像的实际元素,可以反应出商品图像的真实状况,提高了商品图像牛皮癣分值的准确性,可以更加准确地判断出商品图像是否是牛皮癣图像以及牛皮癣严重程度。
为了解决上述问题,本申请公开了一种计算商品图像牛皮癣分值的方法,所述方法包括:
获取商品图像,记录所述商品图像中每个像素点的坐标,并将位于所述商品图像的边界的像素点标记为边界像素点;
提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点;
根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积;
根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值。
进一步地,提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点,包括:
提取所述商品图像中的第一区域块;
分析所述第一区域块的颜色显著度;
根据所述第一区域块的颜色显著度的大小,对所述第一区域块进行扩张,得到扩张后的所述第一区域块;
将位于扩张后的所述第一区域块的像素点标记为牛皮癣像素点。
进一步地,根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积,包括:
将所述商品图像中每个像素点分别作为当前像素点;
判断所述当前像素点是否是所述牛皮癣像素点;
如果所述当前像素点不是所述牛皮癣像素点,则以所述当前像素点为中心,分别查找所述当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点;
将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点,分别作为所述当前像素点的左界点、右界点、上界点和下界点;
根据所述左界点的坐标和所述右界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的宽度;
根据所述上界点的坐标和所述下界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的高度;
根据所述当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到所述当前像素点对应的牛皮癣切割空间面积。
进一步地,判断所述当前像素点是否是所述牛皮癣像素点之后,还包括:
如果所述当前像素点是所述牛皮癣像素点,则设置所述当前像素点对应的牛皮癣切割空间面积为零。
进一步地,根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值,包括:
将所述商品图像中每个像素点对应的牛皮癣切割空间面积,或所述每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数值,作为所述商品图像中每个像素点的权重;
基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值。
进一步地,基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值,包括:
将所述商品图像中所有像素点的权重求和、并归一化后得到的值,作为
所述商品图像的牛皮癣参考分值;
根据所述牛皮癣参考分值和预设的牛皮癣分值表现形式,得到所述商品图像的牛皮癣分值。
进一步地,计算得到所述商品图像的牛皮癣分值之后,还包括:
将计算得到的所述商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较;
根据比较结果,对所述商品图像的牛皮癣严重程度进行判定或分类。
进一步地,所述第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
为了解决上述问题,本申请还公开了一种计算商品图像牛皮癣分值的装置,所述装置包括:
获取模块,用于获取商品图像,记录所述商品图像中每个像素点的坐标,并将位于所述商品图像的边界的像素点标记为边界像素点;
提取模块,用于提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点,其中,所述第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种;
第一计算模块,用于根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积;
第二计算模块,用于根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值。
进一步地,所述提取模块包括:
提取单元,用于提取所述商品图像中的第一区域块;
分析单元,用于分析所述第一区域块的颜色显著度;
扩张单元,用于根据所述第一区域块的颜色显著度的大小,对所述第一区域块进行扩张,得到扩张后的所述第一区域块;
标记单元,用于将位于扩张后的所述第一区域块的像素点标记为牛皮癣
像素点。
进一步地,所述第一计算模块包括:
第一处理单元,用于将所述商品图像中每个像素点分别作为当前像素点;
判断单元,用于判断所述当前像素点是否是所述牛皮癣像素点;
查找单元,用于如果所述当前像素点不是所述牛皮癣像素点,则以所述当前像素点为中心,分别查找所述当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点;
第二处理单元,用于将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点,分别作为所述当前像素点的左界点、右界点、上界点和下界点;
宽度获取单元,用于根据所述左界点的坐标和所述右界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的宽度;
高度获取单元,用于根据所述上界点的坐标和所述下界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的高度;
面积获取单元,用于根据所述当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到所述当前像素点对应的牛皮癣切割空间面积。
进一步地,所述第一计算模块还包括:
设置单元,用于如果所述当前像素点是所述牛皮癣像素点,则设置所述当前像素点对应的牛皮癣切割空间面积为零。
进一步地,所述第二计算模块包括:
权重获取单元,用于将所述商品图像中每个像素点对应的牛皮癣切割空间面积,或所述每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数值,作为所述商品图像中每个像素点的权重;
分值获取单元,用于基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值。
进一步地,所述分值获取单元包括:
参考分值获取子单元,用于将所述商品图像中所有像素点的权重求和、并归一化后得到的值,作为所述商品图像的牛皮癣参考分值;
分值获取子单元,用于根据所述牛皮癣参考分值和预设的牛皮癣分值表现形式,得到所述商品图像的牛皮癣分值。
进一步地,所述装置还包括:
比较模块,用于将计算得到的所述商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较;
判定或分类模块,用于根据比较结果,对所述商品图像的牛皮癣严重程度进行判定或分类。
进一步地,所述第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
与现有技术相比,本申请可以获得包括以下技术效果:
通过根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积,根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值,像素点是商品图像的实际元素,可以反应出商品图像的真实状况,提高了商品图像牛皮癣分值的准确性,可以更加准确地判断出商品图像是否是牛皮癣图像以及牛皮癣严重程度。根据第一区域块的颜色显著度的大小,对第一区域块进行扩张,得到扩张后的第一区域块,使得可以得到更加精确的第一区域块,进一步提高了商品图像牛皮癣分值的准确性。
当然,实施本申请的任一产品必不一定需要同时达到以上所述的所有技术效果。
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:
图1是本申请实施例的第一种计算商品图像牛皮癣分值的方法流程图;
图2是本申请实施例的第二种计算商品图像牛皮癣分值的方法流程图;
图3是本申请实施例的一种商品图像的示意图;
图4是本申请实施例的一种商品图像中的第一区域块示意图;
图5是本申请实施例的一种计算商品图像牛皮癣分值的装置结构示意图。
以下将配合附图及实施例来详细说明本申请的实施方式,藉此对本申请如何应用技术手段来解决技术问题并达成技术功效的实现过程能充分理解并据以实施。
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。
内存可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。内存是计算机可读介质的示例。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括非暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
实施例描述
下面以一实施例对本申请方法的实现作进一步说明。如图1所示,为本
申请实施例的一种计算商品图像牛皮癣分值的方法流程图,该方法包括:
S101:获取商品图像,记录商品图像中每个像素点的坐标,并将位于商品图像的边界的像素点标记为边界像素点。
其中,商品图像可以是购物网站商家中展示的商品图像,也可以是其他类似的图像,对此不做具体限定。
S102:提取商品图像中的第一区域块,并将位于第一区域块的像素点标记为牛皮癣像素点,其中,第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
具体地,提取商品图像中的第一区域块的方法可以采用任何一种方法实现,对此不作限定,如对于文字区域块可以采用基于纹理统计的方法、基于区域分析的方法等。
并且,为了便于提取到更准确的第一区域块,可以对提取到的原始的第一区域块进行扩张,得到扩张后的第一区域块,具体地,提取商品图像中的第一区域块,并将位于第一区域块的像素点标记为牛皮癣像素点,可以包括:
提取商品图像中的第一区域块;
分析第一区域块的颜色显著度;
根据第一区域块的颜色显著度的大小,对第一区域块进行扩张,得到扩张后的第一区域块;
将位于扩张后的第一区域块的像素点标记为牛皮癣像素点。
其中,第一区域块的颜色显著度,可以通过计算第一区域块和周围背景主颜色的距离,或者通过计算第一区域块和周围背景主颜色饱和度的距离来得到。对第一区域块进行扩张,扩张的方法可以采用形态学膨胀,膨胀半径与之前所求的颜色显著度成正比。
S103:根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积。
其中,牛皮癣切割空间面积是指商品图像被第一区域块切割后,商品图像中每个像素点周围的不含牛皮癣像素点的面积。在计算商品图像中每个像素点对应的牛皮癣切割空间面积时,可以采用多种方法实现,如可以采用圆
形的方式、矩形的方式等实现。采用圆形的方式时,可以分别以每个像素点为圆心,按照半径从小到大进行查找,如果该半径的圆形面积中不含有边界像素点和牛皮癣像素点,则接着增大半径进行查找,如果该半径的圆形面积中含有边界像素点或牛皮癣像素点,则将该半径之前的半径作为计算牛皮癣切割空间面积的半径,计算得到牛皮癣切割空间面积。
具体地,采用矩形的方式时,参见图2,根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积,可以包括:
S103a:将商品图像中每个像素点分别作为当前像素点。
S103b:判断当前像素点是否是牛皮癣像素点,如果当前像素点不是牛皮癣像素点,则执行S103c;否则,执行S103h。
S103c:以当前像素点为中心,分别查找当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点。
其中,第一个牛皮癣像素点,如以当前像素点水平向左方向的第一个牛皮癣像素点为例说明,以当前像素点为中心,向当前像素点水平向左方向进行查找时碰到的第一个牛皮癣像素点,如果当前像素点水平向左方向没有存在有牛皮癣像素点,则最终查找到的是当前像素点水平向左方向的边界像素点,其他方向类似,不再一一赘述。
S103d:将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点,分别作为当前像素点的左界点、右界点、上界点和下界点。
S103e:根据左界点的坐标和右界点的坐标,得到当前像素点对应的牛皮癣切割空间面积的宽度。
具体地,右界点的坐标与左界点的坐标之差,即为当前像素点对应的牛皮癣切割空间面积的宽度。
S103f:根据上界点的坐标和下界点的坐标,得到当前像素点对应的牛皮癣切割空间面积的高度。
具体地,下界点的坐标与上界点的坐标之差,即为当前像素点对应的牛皮癣切割空间面积的高度。
S103g:根据当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到当前像素点对应的牛皮癣切割空间面积,然后结束。
具体地,宽度和高度的乘积即为当前像素点对应的牛皮癣切割空间面积。
S103h:设置当前像素点对应的牛皮癣切割空间面积为零,然后结束。
需要说明的是,并不限于上述方法,可以根据实际应用状况采用其他任何可行的方式实现计算商品图像中每个像素点对应的牛皮癣切割空间面积,如可以是:将商品图像中每个像素点分别作为当前像素点,以当前像素点为起始点(即从当前像素点本身开始查找,如果当前像素点本身是牛皮癣像素点,则水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点是其本身,相应的面积就是零),分别查找当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点。
S104:根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值。
具体地,根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值,包括:
将商品图像中每个像素点对应的牛皮癣切割空间面积,或每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数值,作为商品图像中每个像素点的权重;
基于商品图像中所有像素点的权重求和、并归一化后得到的值,计算商品图像的牛皮癣分值。
其中,每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数可以是每个像素点对应的牛皮癣切割空间面积的平方函数、平方根函数、指数函数、对数函数等。
具体地,商品图像中所有像素点的权重和最高的情况发生在商品图像没
有第一区域块下,此时商品图像中每个像素点对应的牛皮癣切割空间面积就是商品图像的面积,可以将商品图像中所有像素点的权重求和后,除以商品图像中所有像素点的权重和最高的值,进行归一化。
具体地,基于商品图像中所有像素点的权重求和、并归一化后得到的值,计算商品图像的牛皮癣分值,包括:
将商品图像中所有像素点的权重求和、并归一化后得到的值,作为商品图像的牛皮癣参考分值;
根据牛皮癣参考分值和预设的牛皮癣分值表现形式,得到商品图像的牛皮癣分值。
具体地,将商品图像中所有像素点的权重求和、并归一化后得到的值是0到1的小数,且该值越大,则商品图像越不可能是牛皮癣图像或牛皮癣越不严重。为了便于判断,可以将该值作为商品图像的牛皮癣参考分值,并可以设置牛皮癣分值表现形式为百分制(或其他),且牛皮癣分值越大,商品图像是牛皮癣图像的可能性越大或牛皮癣越严重,根据牛皮癣参考分值和上述牛皮癣分值表现形式,可以得到牛皮癣参考分值为0对应的牛皮癣分值为100、牛皮癣参考分值为1对应的牛皮癣分值为0、牛皮癣参考分值为0.1对应的牛皮癣分值为90等。以牛皮癣分值表现形式为百分制,且牛皮癣分值越大,商品图像是牛皮癣图像的可能性越大或牛皮癣越严重为例进行具体说明,参见图3和图4,图4中虚线框中的内容为从图3中提取的第一区域块,通过本实施例的方法,计算得到图3的牛皮癣分值为66分,并根据预设的判定或分类准则,将图3判定或分类为中度牛皮癣。
需要说明的是,计算得到商品图像的牛皮癣分值后,可以根据商品图像的牛皮癣分值的含义(牛皮癣分值越大越不可能是牛皮癣图像或牛皮癣越不严重,还是牛皮癣分值越大越可能是牛皮癣图像或牛皮癣越严重),设置相应的牛皮癣判定阈值或牛皮癣分类阈值,将计算得到的商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较,根据比较结果,对商品图像的牛皮癣严重程度进行判定或分类。具体地,如果牛皮癣分值的含义是牛皮癣分值越大越不可能是牛皮癣图像或牛皮癣越不严重,则当比较结果是计算得到的商品图像的牛皮癣分值,大于预设的牛皮癣判定阈值或牛
皮癣分类阈值时,商品图像越不可能是牛皮癣图像或牛皮癣越不严重;当比较结果是计算得到的商品图像的牛皮癣分值,小于等于预设的牛皮癣判定阈值或牛皮癣分类阈值时,商品图像越可能是牛皮癣图像或牛皮癣越严重。如果牛皮癣分值的含义是牛皮癣分值越大越可能是牛皮癣图像或牛皮癣越严重,则根据比较结果,对商品图像的牛皮癣严重程度进行判定或分类时与上述相反,此处不再赘述。
本实施例所述的计算商品图像牛皮癣分值的方法,通过根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积,根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值,像素点是商品图像的实际元素,可以反应出商品图像的真实状况,提高了商品图像牛皮癣分值的准确性,可以更加准确地判断出商品图像是否是牛皮癣图像以及牛皮癣严重程度。根据第一区域块的颜色显著度的大小,对第一区域块进行扩张,得到扩张后的第一区域块,使得可以得到更加精确的第一区域块,进一步提高了商品图像牛皮癣分值的准确性。
如图5所示,是本申请实施例的一种计算商品图像牛皮癣分值的装置结构图,该装置包括:
获取模块201,用于获取商品图像,记录商品图像中每个像素点的坐标,并将位于商品图像的边界的像素点标记为边界像素点;
提取模块202,用于提取商品图像中的第一区域块,并将位于第一区域块的像素点标记为牛皮癣像素点;
第一计算模块203,用于根据商品图像中每个像素点与所述边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积;
第二计算模块204,用于根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值。
优选地,提取模块202包括:
提取单元,用于提取商品图像中的第一区域块;
分析单元,用于分析第一区域块的颜色显著度;
扩张单元,用于根据第一区域块的颜色显著度的大小,对第一区域块进行扩张,得到扩张后的第一区域块;
标记单元,用于将位于扩张后的第一区域块的像素点标记为牛皮癣像素点。
优选地,第一计算模块203包括:
第一处理单元,用于将商品图像中每个像素点分别作为当前像素点;
判断单元,用于判断当前像素点是否是牛皮癣像素点;
查找单元,用于如果当前像素点不是牛皮癣像素点,则以当前像素点为中心,分别查找当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点;
第二处理单元,用于将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点,分别作为当前像素点的左界点、右界点、上界点和下界点;
宽度获取单元,用于根据左界点的坐标和右界点的坐标,得到当前像素点对应的牛皮癣切割空间面积的宽度;
高度获取单元,用于根据上界点的坐标和下界点的坐标,得到当前像素点对应的牛皮癣切割空间面积的高度;
面积获取单元,用于根据当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到当前像素点对应的牛皮癣切割空间面积。
优选地,第一计算模块203还包括:
设置单元,用于如果当前像素点是牛皮癣像素点,则设置当前像素点对应的牛皮癣切割空间面积为零。
优选地,第二计算模块204包括:
权重获取单元,用于将商品图像中每个像素点对应的牛皮癣切割空间面积,或所述每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数
值,作为商品图像中每个像素点的权重;
分值获取单元,用于将商品图像中所有像素点的权重求和、并归一化后得到的值,作为商品图像的牛皮癣分值。
优选地,所述分值获取单元包括:
参考分值获取子单元,用于将商品图像中所有像素点的权重求和、并归一化后得到的值,作为商品图像的牛皮癣参考分值;
分值获取子单元,用于根据牛皮癣参考分值和预设的牛皮癣分值表现形式,得到商品图像的牛皮癣分值。
优选地,该装置还包括:
比较模块,用于将计算得到的商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较;
判定或分类模块,用于根据比较结果,对商品图像的牛皮癣严重程度进行判定或分类。
优选地,第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
本实施例所述的计算商品图像牛皮癣分值的装置,通过根据商品图像中每个像素点与边界像素点、牛皮癣像素点的位置关系,计算商品图像中每个像素点对应的牛皮癣切割空间面积,根据商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到商品图像的牛皮癣分值,像素点是商品图像的实际元素,可以反应出商品图像的真实状况,提高了商品图像牛皮癣分值的准确性,可以更加准确地判断出商品图像是否是牛皮癣图像以及牛皮癣严重程度。根据第一区域块的颜色显著度的大小,对第一区域块进行扩张,得到扩张后的第一区域块,使得可以得到更加精确的第一区域块,进一步提高了商品图像牛皮癣分值的准确性。
所述装置与前述的方法流程描述对应,不足之处参考上述方法流程的叙述,不再一一赘述。
上述说明示出并描述了本申请的若干优选实施例,但如前所述,应当理解本申请并非局限于本文所披露的形式,不应看作是对其他实施例的排除,
而可用于各种其他组合、修改和环境,并能够在本文所述发明构想范围内,通过上述教导或相关领域的技术或知识进行改动。而本领域人员所进行的改动和变化不脱离本申请的精神和范围,则都应在本申请所附权利要求的保护范围内。
Claims (16)
- 一种计算商品图像牛皮癣分值的方法,其特征在于,所述方法包括:获取商品图像,记录所述商品图像中每个像素点的坐标,并将位于所述商品图像的边界的像素点标记为边界像素点;提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点;根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积;根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值。
- 如权利要求1所述的方法,其特征在于,提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点,包括:提取所述商品图像中的第一区域块;分析所述第一区域块的颜色显著度;根据所述第一区域块的颜色显著度的大小,对所述第一区域块进行扩张,得到扩张后的所述第一区域块;将位于扩张后的所述第一区域块的像素点标记为牛皮癣像素点。
- 如权利要求1或2所述的方法,其特征在于,根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积,包括:将所述商品图像中每个像素点分别作为当前像素点;判断所述当前像素点是否是所述牛皮癣像素点;如果所述当前像素点不是所述牛皮癣像素点,则以所述当前像素点为中心,分别查找所述当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点;将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一 个牛皮癣像素点或边界像素点,分别作为所述当前像素点的左界点、右界点、上界点和下界点;根据所述左界点的坐标和所述右界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的宽度;根据所述上界点的坐标和所述下界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的高度;根据所述当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到所述当前像素点对应的牛皮癣切割空间面积。
- 如权利要求3所述的方法,其特征在于,判断所述当前像素点是否是所述牛皮癣像素点之后,还包括:如果所述当前像素点是所述牛皮癣像素点,则设置所述当前像素点对应的牛皮癣切割空间面积为零。
- 如权利要求1或2所述的方法,其特征在于,根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值,包括:将所述商品图像中每个像素点对应的牛皮癣切割空间面积,或所述每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数值,作为所述商品图像中每个像素点的权重;基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值。
- 如权利要求5所述的方法,其特征在于,基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值,包括:将所述商品图像中所有像素点的权重求和、并归一化后得到的值,作为所述商品图像的牛皮癣参考分值;根据所述牛皮癣参考分值和预设的牛皮癣分值表现形式,得到所述商品图像的牛皮癣分值。
- 如权利要求1或2所述的方法,其特征在于,计算得到所述商品图 像的牛皮癣分值之后,还包括:将计算得到的所述商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较;根据比较结果,对所述商品图像的牛皮癣严重程度进行判定或分类。
- 如权利要求1或2所述的方法,其特征在于,所述第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
- 一种计算商品图像牛皮癣分值的装置,其特征在于,所述装置包括:获取模块,用于获取商品图像,记录所述商品图像中每个像素点的坐标,并将位于所述商品图像的边界的像素点标记为边界像素点;提取模块,用于提取所述商品图像中的第一区域块,并将位于所述第一区域块的像素点标记为牛皮癣像素点;第一计算模块,用于根据所述商品图像中每个像素点与所述边界像素点、所述牛皮癣像素点的位置关系,计算所述商品图像中每个像素点对应的牛皮癣切割空间面积;第二计算模块,用于根据所述商品图像中所有像素点对应的牛皮癣切割空间面积,计算得到所述商品图像的牛皮癣分值。
- 如权利要求9所述的装置,其特征在于,所述提取模块包括:提取单元,用于提取所述商品图像中的第一区域块;分析单元,用于分析所述第一区域块的颜色显著度;扩张单元,用于根据所述第一区域块的颜色显著度的大小,对所述第一区域块进行扩张,得到扩张后的所述第一区域块;标记单元,用于将位于扩张后的所述第一区域块的像素点标记为牛皮癣像素点。
- 如权利要求9或10所述的装置,其特征在于,所述第一计算模块包括:第一处理单元,用于将所述商品图像中每个像素点分别作为当前像素点;判断单元,用于判断所述当前像素点是否是所述牛皮癣像素点;查找单元,用于如果所述当前像素点不是所述牛皮癣像素点,则以所述当前像素点为中心,分别查找所述当前像素点水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点;第二处理单元,用于将水平向左方向、水平向右方向、竖直向上方向和竖直向下方向的第一个牛皮癣像素点或边界像素点,分别作为所述当前像素点的左界点、右界点、上界点和下界点;宽度获取单元,用于根据所述左界点的坐标和所述右界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的宽度;高度获取单元,用于根据所述上界点的坐标和所述下界点的坐标,得到所述当前像素点对应的牛皮癣切割空间面积的高度;面积获取单元,用于根据所述当前像素点对应的牛皮癣切割空间面积的宽度和高度,得到所述当前像素点对应的牛皮癣切割空间面积。
- 如权利要求9所述的装置,其特征在于,所述第一计算模块还包括:设置单元,用于如果所述当前像素点是所述牛皮癣像素点,则设置所述当前像素点对应的牛皮癣切割空间面积为零。
- 如权利要求9或10所述的装置,其特征在于,所述第二计算模块包括:权重获取单元,用于将所述商品图像中每个像素点对应的牛皮癣切割空间面积,或所述每个像素点对应的牛皮癣切割空间面积的大于零的单调递增函数值,作为所述商品图像中每个像素点的权重;分值获取单元,用于基于所述商品图像中所有像素点的权重求和、并归一化后得到的值,计算所述商品图像的牛皮癣分值。
- 如权利要求13所述的装置,其特征在于,所述分值获取单元包括:参考分值获取子单元,用于将所述商品图像中所有像素点的权重求和、并归一化后得到的值,作为所述商品图像的牛皮癣参考分值;分值获取子单元,用于根据所述牛皮癣参考分值和预设的牛皮癣分值表 现形式,得到所述商品图像的牛皮癣分值。
- 如权利要求9或10所述的装置,其特征在于,所述装置还包括:比较模块,用于将计算得到的所述商品图像的牛皮癣分值,与预设的牛皮癣判定阈值或牛皮癣分类阈值进行比较;判定或分类模块,用于根据比较结果,对所述商品图像的牛皮癣严重程度进行判定或分类。
- 如权利要求9或10所述的装置,其特征在于,所述第一区域块包括文字区域块、商标区域块和图案区域块中的至少一种。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US15/117,190 US10127470B2 (en) | 2014-02-11 | 2015-02-02 | Computerized method and apparatus for determining obstructed portions of displayed digital content |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201410047760.8A CN104835134B (zh) | 2014-02-11 | 2014-02-11 | 一种计算商品图像牛皮癣分值的方法和装置 |
| CN201410047760.8 | 2014-02-11 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2015120772A1 true WO2015120772A1 (zh) | 2015-08-20 |
Family
ID=53799584
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2015/072115 Ceased WO2015120772A1 (zh) | 2014-02-11 | 2015-02-02 | 一种计算商品图像牛皮癣分值的方法和装置 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US10127470B2 (zh) |
| CN (1) | CN104835134B (zh) |
| WO (1) | WO2015120772A1 (zh) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109815090A (zh) * | 2019-01-22 | 2019-05-28 | 厦门美柚信息科技有限公司 | 一种窗体可视面积的计算方法、系统、设备及其存储介质 |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107545271B (zh) * | 2016-06-29 | 2021-04-09 | 阿里巴巴集团控股有限公司 | 图像识别方法、装置和系统 |
| CN108573255A (zh) * | 2017-03-13 | 2018-09-25 | 阿里巴巴集团控股有限公司 | 文字合成图像的识别方法及装置、图像识别方法 |
| US10788831B2 (en) * | 2017-10-06 | 2020-09-29 | Wipro Limited | Method and device for identifying center of a path for navigation of autonomous vehicles |
| CN111862248B (zh) * | 2019-04-29 | 2023-09-29 | 百度在线网络技术(北京)有限公司 | 用于输出信息的方法和装置 |
| CN110598708B (zh) * | 2019-08-08 | 2022-09-23 | 广东工业大学 | 一种街景文本目标识别检测方法 |
| CN111242977B (zh) * | 2020-01-09 | 2023-04-25 | 影石创新科技股份有限公司 | 全景视频的目标跟踪方法、可读存储介质及计算机设备 |
| CN112256891B (zh) * | 2020-10-26 | 2024-11-22 | 北京达佳互联信息技术有限公司 | 多媒体资源的推荐方法、装置、电子设备及存储介质 |
| CN112418043B (zh) * | 2020-11-16 | 2022-10-28 | 安徽农业大学 | 玉米杂草遮挡确定方法、装置、机器人、设备及存储介质 |
| CN113762235B (zh) * | 2021-02-01 | 2025-09-16 | 北京沃东天骏信息技术有限公司 | 检测页面叠加区域的方法和装置 |
| CN114399617B (zh) * | 2021-12-23 | 2023-08-04 | 北京百度网讯科技有限公司 | 一种遮挡图案识别方法、装置、设备和介质 |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102799669A (zh) * | 2012-07-17 | 2012-11-28 | 杭州淘淘搜科技有限公司 | 一种商品图像视觉质量的自动分级方法 |
| CN102819566A (zh) * | 2012-07-17 | 2012-12-12 | 杭州淘淘搜科技有限公司 | 一种商品图像跨类目检索方法 |
| CN102842135A (zh) * | 2012-07-17 | 2012-12-26 | 杭州淘淘搜科技有限公司 | 一种商品图像主体区域检测方法 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20090013268A1 (en) * | 2007-07-02 | 2009-01-08 | Universal Ad Ltd. | Creation Of Visual Composition Of Product Images |
| JP5028337B2 (ja) * | 2008-05-30 | 2012-09-19 | キヤノン株式会社 | 画像処理装置、画像処理方法、プログラム、及び記憶媒体 |
| US8639036B1 (en) * | 2012-07-02 | 2014-01-28 | Amazon Technologies, Inc. | Product image information extraction |
-
2014
- 2014-02-11 CN CN201410047760.8A patent/CN104835134B/zh not_active Expired - Fee Related
-
2015
- 2015-02-02 US US15/117,190 patent/US10127470B2/en active Active
- 2015-02-02 WO PCT/CN2015/072115 patent/WO2015120772A1/zh not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102799669A (zh) * | 2012-07-17 | 2012-11-28 | 杭州淘淘搜科技有限公司 | 一种商品图像视觉质量的自动分级方法 |
| CN102819566A (zh) * | 2012-07-17 | 2012-12-12 | 杭州淘淘搜科技有限公司 | 一种商品图像跨类目检索方法 |
| CN102842135A (zh) * | 2012-07-17 | 2012-12-26 | 杭州淘淘搜科技有限公司 | 一种商品图像主体区域检测方法 |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109815090A (zh) * | 2019-01-22 | 2019-05-28 | 厦门美柚信息科技有限公司 | 一种窗体可视面积的计算方法、系统、设备及其存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| US10127470B2 (en) | 2018-11-13 |
| US20170039443A1 (en) | 2017-02-09 |
| CN104835134A (zh) | 2015-08-12 |
| HK1208953A1 (zh) | 2016-03-18 |
| CN104835134B (zh) | 2018-01-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2015120772A1 (zh) | 一种计算商品图像牛皮癣分值的方法和装置 | |
| KR101856120B1 (ko) | 이미지로부터 상가 발견 | |
| CN108549870B (zh) | 一种对物品陈列进行鉴别的方法及装置 | |
| US10242036B2 (en) | Hybrid detection recognition system | |
| CN104111960A (zh) | 一种页面的匹配方法和装置 | |
| CN110796669A (zh) | 一种垂直边框定位方法及设备 | |
| WO2018014828A1 (zh) | 识别二维码位置的方法及其系统 | |
| AU2018202767B2 (en) | Data structure and algorithm for tag less search and svg retrieval | |
| US9129152B2 (en) | Exemplar-based feature weighting | |
| CN115861400B (zh) | 目标对象检测方法、训练方法、装置以及电子设备 | |
| CN111428743A (zh) | 商品识别方法、商品处理方法、装置及电子设备 | |
| CN115661624A (zh) | 一种货架的数字化方法、装置及电子设备 | |
| CN112819953A (zh) | 三维重建方法、网络模型训练方法、装置及电子设备 | |
| CN111652144B (zh) | 基于目标区域融合的题目分割方法、装置、设备和介质 | |
| CN110069980A (zh) | 基于图像的产品聚合方法及装置、电子设备 | |
| CN110223320B (zh) | 物体检测跟踪方法和检测跟踪装置 | |
| WO2015120771A1 (zh) | 一种数字图像质量分级的方法和装置 | |
| CN104123528B (zh) | 一种识别图片的方法及装置 | |
| CN106529548A (zh) | 亚像素级的多尺度Harris角点检测算法 | |
| CN113096104A (zh) | 目标分割模型的训练方法及装置和目标分割方法及装置 | |
| CN111241893B (zh) | 一种标识识别方法、装置及系统 | |
| CN107452003A (zh) | 一种含有深度信息的图像分割的方法及装置 | |
| CN114638996B (zh) | 基于对抗学习的模型训练方法、装置、设备和存储介质 | |
| CN107145892A (zh) | 一种基于自适应融合机制的图像显著性物体检测方法 | |
| CN108073581A (zh) | 地图区域名称的显示方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15749272 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 15117190 Country of ref document: US |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 15749272 Country of ref document: EP Kind code of ref document: A1 |