CN113837987B - Tongue image acquisition method and device and computer equipment - Google Patents

Tongue image acquisition method and device and computer equipment Download PDF

Info

Publication number
CN113837987B
CN113837987B CN202011621984.7A CN202011621984A CN113837987B CN 113837987 B CN113837987 B CN 113837987B CN 202011621984 A CN202011621984 A CN 202011621984A CN 113837987 B CN113837987 B CN 113837987B
Authority
CN
China
Prior art keywords
image
tongue
duty ratio
region
threshold value
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.)
Active
Application number
CN202011621984.7A
Other languages
Chinese (zh)
Other versions
CN113837987A (en
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202011621984.7A priority Critical patent/CN113837987B/en
Publication of CN113837987A publication Critical patent/CN113837987A/en
Application granted granted Critical
Publication of CN113837987B publication Critical patent/CN113837987B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30004Biomedical image processing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The application provides a tongue image acquisition method, a tongue image acquisition device and computer equipment, wherein the method comprises the following steps: acquiring an acquired image, and performing image segmentation on the image to acquire a tongue region, a face region and a background region in the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.

Description

Tongue image acquisition method and device and computer equipment
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a tongue image acquisition method, apparatus, and computer device.
Background
In the related art, when tongue diagnosis is performed, it is necessary to make a diagnosis by relying on tongue images. The quality of tongue images directly affects the accuracy of tongue diagnosis.
At present, the tongue image acquisition method mainly uses an image uploaded by a user or an acquired user image with a tongue as a tongue image. In the above-mentioned acquisition method, the quality of the acquired image is poor, for example, the image with slightly exposed tongue is also used as the tongue image, so that the quality of the tongue image is reduced, and the accuracy of tongue diagnosis is reduced.
Disclosure of Invention
The present application aims to solve at least one of the technical problems in the related art to some extent.
The application provides a tongue image acquisition method, a tongue image acquisition device and computer equipment, which are used for judging whether an image is a tongue image or not by acquiring the duty ratio of a tongue region and the like in the image, so that the quality of the tongue image is improved, and the accuracy of tongue diagnosis is further improved.
An embodiment of a first aspect of the present application provides a tongue image acquisition method, including:
acquiring an acquired image, and performing image segmentation on the image to acquire a tongue region, a face region and a background region in the image;
determining a first duty cycle of the face region in the image and a second duty cycle of the tongue region in the face region according to the tongue region, the face region and the background region;
determining whether the image meets a preset tongue image acquisition condition according to the first duty ratio and the second duty ratio;
and when the image meets the tongue image acquisition condition, determining the image as a tongue image.
According to the tongue image acquisition method, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
An embodiment of a second aspect of the present application provides a tongue image acquisition apparatus, including:
the acquisition module is used for acquiring an acquired image and carrying out image segmentation on the image so as to acquire a tongue region, a face region and a background region in the image;
a first determining module configured to determine a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region, and the background region;
the second determining module is used for determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio;
and the third determining module is used for determining the image to be a tongue image when the image meets the tongue image acquisition condition.
According to the tongue image acquisition device, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
An embodiment of a third aspect of the present application proposes a computer device comprising: the tongue image acquisition method is realized by the processor, and the tongue image acquisition method is provided by the embodiment of the first aspect of the application when the processor executes the program.
An embodiment of a fourth aspect of the present application proposes a computer program product, which when executed by an instruction processor in the computer program product, performs the tongue image acquisition method proposed by the embodiment of the first aspect of the present application.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flowchart of a tongue image acquisition method according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a tongue image acquisition method according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of a tongue image acquisition device according to a third embodiment of the present application;
FIG. 4 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The traditional tongue image acquisition method mainly uses an image uploaded by a user or an acquired user image with a tongue as a tongue image. In the above-mentioned acquisition method, the quality of the acquired image is poor, for example, the image with slightly exposed tongue is also used as the tongue image, so that the quality of the tongue image is reduced, and the accuracy of tongue diagnosis is reduced.
Therefore, the application mainly aims at the technical problems of poor tongue image quality and low tongue diagnosis accuracy in the prior art, and provides a tongue image acquisition method.
According to the tongue image acquisition method, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
The tongue image acquisition method, the tongue image acquisition device and the computer equipment according to the embodiment of the application are described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a tongue image acquisition method according to an embodiment of the present application.
The embodiment of the application is exemplified by the tongue image acquisition method being configured in a tongue image acquisition device, and the tongue image acquisition device can be applied to any computer equipment so that the computer equipment can execute a tongue image acquisition function.
The computer device may be a personal computer (Personal Computer, abbreviated as PC), a cloud device, a mobile device, etc., and the mobile device may be a mobile phone, a tablet computer, a personal digital assistant, a wearable device, a vehicle-mounted device, etc. with various hardware devices including an operating system, a touch screen, and/or a display screen.
As shown in fig. 1, the tongue image acquisition method may include the steps of:
step 101, acquiring an acquired image, and performing image segmentation on the image to acquire a tongue region, a face region and a background region in the image.
In the embodiment of the present application, the tongue image acquisition device may acquire an image, for example, by uploading the image by a user, acquiring the image from other devices of the user, or shooting the image by using an image acquisition device. The image segmentation method may be, for example, a threshold-based image segmentation method, a region-based image segmentation method, a watershed algorithm, a segmentation method based on edge detection, or the like.
In the embodiment of the application, the face area is a human face area, and the area comprises a tongue area. The background area is an area other than the face area in the image. If the tongue region is not acquired by image segmentation of the image, it is determined that the image is not a tongue image.
Step 102, determining a first duty ratio of the face area in the image and a second duty ratio of the tongue area in the face area according to the tongue area, the face area and the background area.
In the embodiment of the present application, in the first implementation scenario, the process of executing step 102 by the tongue image acquisition device may be, for example, determining, according to the face area and the background area, a total area of the image and an area of the total area; acquiring the area of a face area and the area of a tongue area; determining a ratio of an area of the face region to an area of the total region as a first duty ratio; the ratio of the area of the tongue region to the area of the face region is determined as the second duty cycle.
In the embodiment of the present application, in the second implementation scenario, the process of executing step 102 by the tongue image acquisition device may, for example, be that, according to the face area and the background area, the total area of the image and the number of pixels in the total area are determined; acquiring the number of pixels of a face area and the number of pixels of a tongue area; determining the ratio of the number of pixels of the face area to the number of pixels of the total area as a first duty ratio; and determining the ratio of the number of pixels of the tongue region to the number of pixels of the face region as a second duty ratio.
Step 103, determining whether the image meets the preset tongue image acquisition condition according to the first duty ratio and the second duty ratio.
In the embodiment of the present application, the preset tongue image acquisition conditions may include, for example: the first duty ratio is equal to or greater than the first threshold and equal to or less than the second threshold, and the second duty ratio is equal to or greater than the third threshold. Wherein the second threshold is greater than the first threshold.
In the embodiment of the present application, the process of executing step 103 by the tongue image capturing device may be, for example, determining whether the first duty ratio is greater than or equal to a first threshold value and less than or equal to a second threshold value; judging whether the second duty ratio is larger than or equal to a third threshold value or not when the first duty ratio is larger than or equal to the first threshold value and smaller than or equal to the second threshold value; and when the second duty ratio is greater than or equal to a third threshold value, determining that the image meets the preset tongue image acquisition condition.
In addition, when the first duty ratio is smaller than the first threshold value, or when the first duty ratio is larger than the second threshold value, or when the second duty ratio is smaller than the third threshold value, the tongue image acquisition device determines that the image does not satisfy the tongue image acquisition condition.
And 104, determining the image as a tongue image when the image meets tongue image acquisition conditions.
In the embodiment of the application, when the image does not meet the tongue image acquisition condition, acquiring an image acquisition mode; prompting the user to adjust the shooting distance or shooting gesture when the image acquisition mode is that the image acquisition equipment is adopted to shoot the user; when the image acquisition mode is other modes, for example, the user uploads the image automatically, and when the image acquisition mode is acquired from other equipment of the user, the prompting operation is not performed.
In the embodiment of the present application, the process of prompting the user to adjust the shooting distance or the shooting posture by the tongue image acquisition device may be, for example, prompting the user to approach the image acquisition device when the first duty ratio is smaller than the first threshold value; prompting a user to be far away from the image acquisition equipment when the first duty ratio is larger than a second threshold value; and when the second duty ratio is smaller than a third threshold value, prompting the user to extend the tongue so as to shoot again.
According to the tongue image acquisition method, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
Fig. 2 is a flowchart of a tongue image acquisition method according to a second embodiment of the present application. As shown in fig. 2, the tongue image acquisition method may include the steps of:
step 201, acquiring an acquired image, wherein the image acquisition mode is adopted to acquire the image of the user by adopting image acquisition equipment.
Step 202, image segmentation is performed on the image to obtain tongue region, face region and background region in the image.
In the embodiment of the application, the face area is a human face area, and the area comprises a tongue area. The background area is an area other than the face area in the image. The image segmentation method may be, for example, a threshold-based image segmentation method, a region-based image segmentation method, a watershed algorithm, a segmentation method based on edge detection, or the like.
Step 203 determines a first duty cycle of the face region in the image.
Step 204, determining whether the first duty ratio is greater than or equal to a first threshold and less than or equal to a second threshold, if yes, executing step 205; if not, step 208 is performed.
Step 205, a second duty cycle of the tongue region in the face region is determined.
Step 206, determining whether the second duty ratio is equal to or greater than the third threshold, if yes, executing step 207, otherwise, executing step 208.
In step 207, the image is determined to be a tongue image.
Step 208, prompt the user to adjust the shooting distance or shooting pose in order to re-capture the image.
The specific guiding manner is referred to the embodiment shown in fig. 1, and will not be described in detail here.
According to the tongue image acquisition method, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
Fig. 3 is a schematic structural diagram of a tongue image acquisition device according to a third embodiment of the present application.
As shown in fig. 3, the tongue image capturing device 300 may include: the acquisition module 310, the first determination module 320, the second determination module 330, and the third determination module 340.
The acquiring module 310 is configured to acquire an acquired image, and perform image segmentation on the image to acquire a tongue region, a face region and a background region in the image;
a first determining module 320, configured to determine a first duty ratio of the face area in the image and a second duty ratio of the tongue area in the face area according to the tongue area, the face area and the background area;
a second determining module 330, configured to determine whether the image meets a preset tongue image acquisition condition according to the first duty ratio and the second duty ratio;
and a third determining module 340, configured to determine that the image is a tongue image when the image meets the tongue image acquisition condition.
Further, in one possible implementation manner of the embodiment of the present application, the first determining module 320 is specifically configured to,
determining a total area of the image and an area of the total area according to the face area and the background area;
acquiring the area of the face region and the area of the tongue region;
determining a ratio of an area of the face region to an area of the total region as the first duty ratio;
the ratio of the area of the tongue region to the area of the face region is determined as the second duty ratio.
Further, in one possible implementation of the embodiment of the present application, the second determining module 330 is specifically configured to,
judging whether the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
judging whether the second duty ratio is larger than or equal to a third threshold value or not when the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
and when the second duty ratio is larger than or equal to the third threshold value, determining that the image meets a preset tongue image acquisition condition.
Further, in a possible implementation of the embodiment of the present application, the second determining module 330 is specifically further configured to,
and when the first duty ratio is smaller than the first threshold value, or when the first duty ratio is larger than the second threshold value, or when the second duty ratio is smaller than the third threshold value, determining that the image does not meet the tongue image acquisition condition.
Further, in a possible implementation manner of the embodiment of the present application, the apparatus further includes: a prompting module;
the acquiring module 310 is further configured to acquire an acquisition mode of the image when the image does not meet the tongue image acquisition condition;
the prompting module is used for prompting the user to adjust the shooting distance or the shooting gesture when the image acquisition mode is that the image acquisition equipment is adopted for shooting the user.
Further, in one possible implementation manner of the embodiment of the present application, the tongue image acquisition condition includes: the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value, and the second duty ratio is larger than or equal to a third threshold value;
the prompting module is particularly used for prompting the user to prompt the user to select the user to be prompting the user to,
prompting the user to approach the image acquisition device when the first duty ratio is smaller than the first threshold value;
prompting the user to be far away from the image acquisition equipment when the first duty ratio is larger than the second threshold value;
and prompting the user to extend the tongue to shoot again when the second duty ratio is smaller than the third threshold value.
Further, in a possible implementation manner of the embodiment of the present application, the third determining module 340 is further configured to determine that the image is not the tongue image if the tongue area in the image is not acquired.
It should be noted that the explanation in the first embodiment is also applicable to the tongue image capturing device of this embodiment, and will not be repeated here.
According to the tongue image acquisition device, the tongue region, the face region and the background region in the image are acquired by acquiring the acquired image and performing image segmentation on the image; determining a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region and the background region; determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio; when the image meets tongue image acquisition conditions, the image is determined to be a tongue image, so that the quality of the tongue image can be improved, and the accuracy of tongue diagnosis is improved.
In order to implement the above embodiment, the present application further proposes a computer device including: the tongue image acquisition method according to the embodiment of the application is realized by a memory, a processor and a computer program stored in the memory and capable of running on the processor.
In order to implement the above-mentioned embodiments, the present application also proposes a computer program product which, when executed by an instruction processor in the computer program product, performs the tongue image acquisition method as proposed in the foregoing embodiments of the present application.
FIG. 4 illustrates a block diagram of an exemplary computer device suitable for use in implementing embodiments of the present application. The computer device 12 shown in fig. 4 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in FIG. 4, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 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 (Industry Standard Architecture; hereinafter ISA) bus, micro channel architecture (Micro Channel Architecture; hereinafter MAC) bus, enhanced ISA bus, video electronics standards Association (Video Electronics Standards Association; hereinafter VESA) local bus, and peripheral component interconnect (Peripheral Component Interconnection; hereinafter PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (Random Access Memory; hereinafter: RAM) 30 and/or cache memory 32. The computer device 12 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. 4, commonly referred to as a "hard disk drive"). Although not shown in fig. 4, 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 compact disk read only memory (Compact Disc Read Only Memory; hereinafter CD-ROM), digital versatile read only optical disk (Digital Video Disc Read Only Memory; hereinafter 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. 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 embodiments of the application.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, 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 12 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 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 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 12 may also communicate with one or more networks such as a local area network (Local Area Network; hereinafter LAN), a wide area network (Wide Area Network; hereinafter WAN) and/or a public network such as the Internet via the network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with computer device 12, 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 data processing by running programs stored in the system memory 28, for example, implementing the methods mentioned in the foregoing embodiments.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer readable medium may even be paper or other suitable medium on which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like. While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (16)

1. The tongue image acquisition method is characterized by comprising the following steps of:
acquiring an acquired image, and performing image segmentation on the image to acquire a tongue region, a face region and a background region in the image;
determining a first duty cycle of the face region in the image and a second duty cycle of the tongue region in the face region according to the tongue region, the face region and the background region;
determining whether the image meets a preset tongue image acquisition condition according to the first duty ratio and the second duty ratio;
and when the image meets the tongue image acquisition condition, determining the image as a tongue image.
2. The method of claim 1, wherein the determining a first duty cycle of the face region in the image and a second duty cycle of the tongue region in the face region from the tongue region, the face region, and the background region comprises:
determining a total area of the image and an area of the total area according to the face area and the background area;
acquiring the area of the face region and the area of the tongue region;
determining a ratio of an area of the face region to an area of the total region as the first duty ratio;
the ratio of the area of the tongue region to the area of the face region is determined as the second duty ratio.
3. The method of claim 1, wherein the determining whether the image satisfies a preset tongue image acquisition condition according to the first and second duty ratios comprises:
judging whether the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
judging whether the second duty ratio is larger than or equal to a third threshold value or not when the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
and when the second duty ratio is larger than or equal to the third threshold value, determining that the image meets a preset tongue image acquisition condition.
4. The method of claim 3, wherein said determining whether the image satisfies a preset tongue image acquisition condition based on the first and second duty cycles comprises:
and when the first duty ratio is smaller than the first threshold value, or when the first duty ratio is larger than the second threshold value, or when the second duty ratio is smaller than the third threshold value, determining that the image does not meet the tongue image acquisition condition.
5. The method as recited in claim 1, further comprising:
when the image does not meet the tongue image acquisition condition, acquiring an acquisition mode of the image;
and prompting the user to adjust the shooting distance or the shooting gesture when the image acquisition mode is that the image acquisition equipment is adopted for shooting the user.
6. The method of claim 5, wherein the tongue image acquisition conditions include: the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value, and the second duty ratio is larger than or equal to a third threshold value;
the prompting the user to adjust the shooting distance or the shooting gesture includes:
prompting the user to approach the image acquisition device when the first duty ratio is smaller than the first threshold value;
prompting the user to be far away from the image acquisition equipment when the first duty ratio is larger than the second threshold value;
and prompting the user to extend the tongue to shoot again when the second duty ratio is smaller than the third threshold value.
7. The method as recited in claim 1, further comprising:
and if the tongue region in the image is not acquired, determining that the image is not the tongue image.
8. A tongue image acquisition device, comprising:
the acquisition module is used for acquiring an acquired image and carrying out image segmentation on the image so as to acquire a tongue region, a face region and a background region in the image;
a first determining module configured to determine a first duty ratio of the face region in the image and a second duty ratio of the tongue region in the face region according to the tongue region, the face region, and the background region;
the second determining module is used for determining whether the image meets preset tongue image acquisition conditions according to the first duty ratio and the second duty ratio;
and the third determining module is used for determining the image to be a tongue image when the image meets the tongue image acquisition condition.
9. The apparatus of claim 8, wherein the first determining means is specifically configured to,
determining a total area of the image and an area of the total area according to the face area and the background area;
acquiring the area of the face region and the area of the tongue region;
determining a ratio of an area of the face region to an area of the total region as the first duty ratio;
the ratio of the area of the tongue region to the area of the face region is determined as the second duty ratio.
10. The apparatus of claim 8, wherein the second determining means is specifically configured to,
judging whether the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
judging whether the second duty ratio is larger than or equal to a third threshold value or not when the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value;
and when the second duty ratio is larger than or equal to the third threshold value, determining that the image meets a preset tongue image acquisition condition.
11. The apparatus of claim 10, wherein the second determining means is further operable,
and when the first duty ratio is smaller than the first threshold value, or when the first duty ratio is larger than the second threshold value, or when the second duty ratio is smaller than the third threshold value, determining that the image does not meet the tongue image acquisition condition.
12. The apparatus as recited in claim 8, further comprising: a prompting module;
the acquisition module is further used for acquiring an acquisition mode of the image when the image does not meet the tongue image acquisition condition;
the prompting module is used for prompting the user to adjust the shooting distance or the shooting gesture when the image acquisition mode is that the image acquisition equipment is adopted for shooting the user.
13. The apparatus of claim 12, wherein the tongue image acquisition condition comprises: the first duty ratio is larger than or equal to a first threshold value and smaller than or equal to a second threshold value, and the second duty ratio is larger than or equal to a third threshold value;
the prompting module is particularly used for prompting the user to prompt the user to select the user to be prompting the user to,
prompting the user to approach the image acquisition device when the first duty ratio is smaller than the first threshold value;
prompting the user to be far away from the image acquisition equipment when the first duty ratio is larger than the second threshold value;
and prompting the user to extend the tongue to shoot again when the second duty ratio is smaller than the third threshold value.
14. The apparatus of claim 8, wherein the third determining module is further configured to determine that the image is not the tongue image if a tongue region in the image is not acquired.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202011621984.7A 2020-12-31 2020-12-31 Tongue image acquisition method and device and computer equipment Active CN113837987B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011621984.7A CN113837987B (en) 2020-12-31 2020-12-31 Tongue image acquisition method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011621984.7A CN113837987B (en) 2020-12-31 2020-12-31 Tongue image acquisition method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN113837987A CN113837987A (en) 2021-12-24
CN113837987B true CN113837987B (en) 2023-11-03

Family

ID=78962493

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011621984.7A Active CN113837987B (en) 2020-12-31 2020-12-31 Tongue image acquisition method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN113837987B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499778B (en) * 2023-10-30 2024-09-17 海南榕树家信息科技有限公司 Character image shooting interface interaction method and device and electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101265849B1 (en) * 2012-07-05 2013-05-20 한국 한의학 연구원 Apparatus and method for photographing tongue image
CN103957396A (en) * 2014-05-14 2014-07-30 姚杰 Image processing method and device used when tongue diagnosis is conducted with intelligent device and equipment
JP2015226154A (en) * 2014-05-27 2015-12-14 株式会社日立製作所 Tongue image capturing apparatus, method, and program
CN106557746A (en) * 2016-11-14 2017-04-05 福建北极光虚拟视觉展示科技有限公司 A kind of tongue based on image recognition technology is as detection method and system
CN109712707A (en) * 2018-12-29 2019-05-03 深圳和而泰数据资源与云技术有限公司 A kind of lingual diagnosis method, apparatus calculates equipment and computer storage medium
CN109785345A (en) * 2019-01-25 2019-05-21 中电健康云科技有限公司 Image partition method and device
WO2019237775A1 (en) * 2018-06-15 2019-12-19 华为技术有限公司 Image information acquisition method and device
WO2020029915A1 (en) * 2018-08-06 2020-02-13 深圳市前海安测信息技术有限公司 Artificial intelligence-based device and method for tongue image splitting in traditional chinese medicine, and storage medium
CN110956134A (en) * 2019-11-29 2020-04-03 华人运通(上海)云计算科技有限公司 Face recognition method, face recognition device, face recognition equipment and computer-readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101265849B1 (en) * 2012-07-05 2013-05-20 한국 한의학 연구원 Apparatus and method for photographing tongue image
CN103957396A (en) * 2014-05-14 2014-07-30 姚杰 Image processing method and device used when tongue diagnosis is conducted with intelligent device and equipment
JP2015226154A (en) * 2014-05-27 2015-12-14 株式会社日立製作所 Tongue image capturing apparatus, method, and program
CN106557746A (en) * 2016-11-14 2017-04-05 福建北极光虚拟视觉展示科技有限公司 A kind of tongue based on image recognition technology is as detection method and system
WO2019237775A1 (en) * 2018-06-15 2019-12-19 华为技术有限公司 Image information acquisition method and device
WO2020029915A1 (en) * 2018-08-06 2020-02-13 深圳市前海安测信息技术有限公司 Artificial intelligence-based device and method for tongue image splitting in traditional chinese medicine, and storage medium
CN109712707A (en) * 2018-12-29 2019-05-03 深圳和而泰数据资源与云技术有限公司 A kind of lingual diagnosis method, apparatus calculates equipment and computer storage medium
CN109785345A (en) * 2019-01-25 2019-05-21 中电健康云科技有限公司 Image partition method and device
CN110956134A (en) * 2019-11-29 2020-04-03 华人运通(上海)云计算科技有限公司 Face recognition method, face recognition device, face recognition equipment and computer-readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于最大类间方差法和区域生长的舌体自动分割;黄展鹏;黄益栓;易法令;林育;;时珍国医国药(第12期);3062-3064 *

Also Published As

Publication number Publication date
CN113837987A (en) 2021-12-24

Similar Documents

Publication Publication Date Title
CN107527630B (en) Voice endpoint detection method and device and computer equipment
US11048913B2 (en) Focusing method, device and computer apparatus for realizing clear human face
CN109993713B (en) Image distortion correction method and device for vehicle-mounted head-up display system
CN110969580B (en) Image display method and device
CN110618803B (en) Image display method and device
CN109215037B (en) Target image segmentation method and device and terminal equipment
CN113807160B (en) Method and device for detecting hijacking of image acquisition equipment and computer equipment
CN112312001B (en) Image detection method, device, equipment and computer storage medium
CN107390984A (en) A kind of brightness adjusting method and relevant device
CN113837987B (en) Tongue image acquisition method and device and computer equipment
CN109558505A (en) Visual search method, apparatus, computer equipment and storage medium
CN114418908A (en) Image processing method, image processing device, electronic equipment and storage medium
CN111063011B (en) Face image processing method, device, equipment and medium
CN111126101B (en) Method and device for determining key point position, electronic equipment and storage medium
CN110189242B (en) Image processing method and device
US20160035075A1 (en) Electronic apparatus and image processing method
CN114639056A (en) Live content identification method and device, computer equipment and storage medium
CN111126105B (en) Human body key point detection method and device
KR20190093143A (en) Method and apparatus for generating hdr images with reduced clipped areas
CN114154003B (en) Picture acquisition method and device and electronic equipment
CN115866134B (en) Near field communication NFC card determination method and device, electronic equipment and storage medium
CN115984798A (en) Lane line detection method, lane line detection device, electronic device, and storage medium
CN107358601B (en) Face smoothness calculation method and device
CN116188321A (en) Video noise reduction method and device and electronic equipment
CN115689973A (en) Image quality evaluation method and device, electronic device 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
GR01 Patent grant
GR01 Patent grant