Electronic device for testing attributes of coin, and operation method therefor

By performing image detection and adjustment processes on electronic devices, we ensure the best shooting conditions for coins in pictures, and combining the front and back information of the coin, the problem of inaccurate detection results in the prior art is solved, and higher detection accuracy is achieved .

WO2024239966A1PCT designated stage expired Publication Date: 2024-11-28HANGZHOU RUISHENG SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/091946
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-19
Filing Date
2024-05-09
Publication Date
2024-11-28

AI Technical Summary

Technical Problem

When detecting the attributes of coin, it is difficult to combine the information on the front and the information on the back of the coin, resulting in the inaccurate detection results. The clarity of the picture and the size of the coin have an impact on the detection results, making it difficult to ensure the optimal shooting conditions for the coin in the picture. .

Method used

The video stream is obtained through the shooting device of the electronic device, the image detection process is performed, the position, size and clarity of the coin are detected, and the shooting device is adjusted to meet the conditions of the photographed picture, including prompting the user to flip, adjust the focus and zooming multiple to ensure the coin is ensured. At the best position and size in the picture frame, finally take the front and back sides of the coin for attribute detection.

Benefits of technology

More precise coin attribute detection is achieved, the accuracy of the detection results is improved, the optimal shooting conditions for coins in pictures is ensured, and the uncertainty of user operations and shooting errors are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024091946_28112024_PF_FP_ABST
    Figure CN2024091946_28112024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to an operation method for an electronic device for testing attributes of a coin. The method comprises: obtaining a video stream by means of a photographing apparatus of an electronic device, and displaying a photographing interface by means of a display apparatus of the electronic device; executing an image detection process, such that a coin which is detected in a picture frame of the video stream meets a condition for being photographed; once the coin which is detected in the picture frame meets the condition for being photographed, automatically triggering the photographing apparatus to take a first picture of the coin or prompting a user to take the first picture, and prompting, by means of the display apparatus of the electronic device, the user to turn the coin over; executing the image detection process again; and once the coin which is detected in the picture frame meets the condition for being photographed, automatically triggering the photographing apparatus to take a second picture of the coin or prompting the user to take the second picture, and testing attributes of the coin on the basis of the first picture and the second picture. The present disclosure further relates to an electronic device for detecting attributes of a coin.
Need to check novelty before this filing date? Find Prior Art

Description

Electronic device for detecting coin attributes and operating method thereof Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to an operating method of an electronic device for detecting coin attributes and an electronic device for detecting coin attributes. Background Art

[0002] With the popularity of applications using artificial intelligence technology, more and more application demands have emerged, such as detecting coin properties, such as the coin's appearance, by inputting coin images into applications installed on client devices.

[0003] Summary of the Invention

[0004] One of the purposes of the present disclosure is to provide a method for detecting coin attributes based on a neural network model and a method for training a neural network model.

[0005] According to a first aspect of the present disclosure, a method for operating an electronic device for detecting coin properties is provided, comprising: obtaining a video stream through a shooting device of the electronic device, and displaying a shooting interface through a display device of the electronic device; executing an image detection process so that a coin detected in a picture frame of the video stream meets a condition for a photographed picture; once the coin detected in the picture frame meets the condition for a photographed picture, the shooting device is automatically triggered to shoot a first picture of the coin or prompts a user to shoot a first picture, and in response to the first picture being shot, the user is prompted to turn the coin over through the display device of the electronic device; executing the image detection process again; once the coin detected in the picture frame meets the condition for a photographed picture, the shooting device is automatically triggered to shoot a second picture of the coin or prompts the user to shoot a second picture; and in response to the second picture being shot, the properties of the coin are detected based on the first picture and the second picture.

[0006] According to a second aspect of the present disclosure, there is provided an operating method of an electronic device for detecting coin attributes, comprising: obtaining a video stream through a shooting device of the electronic device, and displaying a shooting interface through a display device of the electronic device; executing an image detection process so that the coin detected in the picture frame of the video stream meets the conditions of the photographed picture, the image detection process comprising: detecting the position and size of the coin in the picture frame; in response to the size of the coin in the picture frame not being within a target size range, prompting a user through the display device to move the shooting device closer to or further away from the coin; in response to the position of the coin in the picture frame not being within a target position range, prompting a user through the display device to move the coin toward the target position range, and initializing a stability value to an initial stability value; in response to the focus of the shooting device not being within the boundary of the coin, focusing the shooting device on the center of the portion surrounded by the boundary of the coin; in response to the distance between the center of the portion surrounded by the boundary of the coin detected this time and the center of the portion surrounded by the boundary of the coin detected last time being not less than a center distance threshold, initializing the stability value to the initial stability value, and returning to repeat the execution of the Image detection process; in response to the distance being less than the center distance threshold, increasing the stability value; in response to the stability value being not greater than the first stability threshold, returning to repeatedly execute the image detection process; in response to the stability value being greater than the first stability threshold, determining and adjusting the zoom factor and increasing the stability value; in response to the stability value being not greater than a second stability threshold that is greater than the first stability threshold, adjusting the focus to refocus on the center of the detected coin, returning to repeatedly execute the image detection process; in response to the stability value being greater than the second stability threshold, ending the image detection process; once the coin detected in the picture frame meets the conditions for the picture to be taken, automatically triggering the shooting device to take a first picture of the coin or prompting the user to take a first picture, and in response to the first picture being taken, prompting the user to turn the coin over through the display device of the electronic device; executing the image detection process again; and once the coin detected in the picture frame meets the conditions for the picture to be taken, automatically triggering the shooting device to take a second picture of the coin or prompting the user to take a second picture, and in response to the second picture being taken, detecting the properties of the coin based on the first picture and the second picture.

[0007] According to a third aspect of the present disclosure, a method for operating an electronic device for detecting coin properties is provided, comprising: obtaining a video stream through a shooting device of the electronic device, displaying a shooting interface through a display device of the electronic device, and displaying the video stream in the shooting interface with a magnification corresponding to the shooting focal length of the shooting device; displaying a frame in the shooting interface to indicate the target position range of the coin in the picture frame of the video stream; aligning the focus of the shooting of the shooting device with the center of the frame; in response to receiving a specific operation through an operable area of ​​the electronic device, taking a first picture of the coin through the shooting device; prompting a user to turn the coin over through the display device, and in response to receiving a specific operation through the operable area, taking a second picture of the coin through the shooting device; and detecting the properties of the coin based on the first picture and the second picture.

[0008] According to a fourth aspect of the present disclosure, an electronic device for detecting coin attributes is provided, comprising: one or more processors; and one or more memories, wherein the one or more memories are configured to store a series of computer-executable instructions, wherein, when the series of computer-executable instructions are executed by the one or more processors, the one or more processors perform the method as described above.

[0009] According to a fifth aspect of the present disclosure, a non-temporary computer-readable storage medium is provided, on which a series of computer-executable instructions are stored. When the series of computer-executable instructions are executed by one or more computing devices, the one or more computing devices perform the method as described above.

[0010] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0012] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0013] FIG1 is an exemplary flow chart of an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0014] FIG2 is an exemplary flow chart of an image detection process in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0015] 3A to 3C are exemplary flow charts of an image detection process in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0016] FIG4 is an exemplary flow chart of an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0017] 5A and 5B are schematic diagrams of a photographing interface in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0018] FIG6 is a schematic diagram illustrating determining a zoom factor during an image detection process in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0019] FIG7 is a schematic diagram of the front and back images of a coin in an embodiment of the present disclosure.

[0020] 8A to 8H are schematic diagrams of a photographing interface in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0021] FIG9 is a structural diagram of at least a portion of an electronic device for detecting coin attributes according to an embodiment of the present disclosure.

[0022] FIG. 10 is an exemplary block diagram of a general hardware system applicable according to an embodiment of the present disclosure.

[0023] Note that in the embodiments described below, the same reference numerals are sometimes used in common across different drawings to denote the same parts or parts having the same functions, and their repeated descriptions are omitted. In some cases, similar reference numerals and letters are used to denote similar items, so once an item is defined in one drawing, it need not be further discussed in subsequent drawings. DETAILED DESCRIPTION

[0024] The present disclosure will be described below with reference to the accompanying drawings, which illustrate several embodiments of the present disclosure. However, it should be understood that the present disclosure can be presented in many different ways and is not limited to the embodiments described below; in fact, the embodiments described below are intended to make the present disclosure more complete and fully illustrate the scope of protection of the present disclosure to those skilled in the art. It should also be understood that the embodiments of the present disclosure can be combined in various ways to provide many additional embodiments.

[0025] It should be understood that the terms used in this disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure. Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the meanings commonly understood by those skilled in the art. For the sake of brevity and / or clarity, well-known functions or structures may not be described in detail.

[0026] In the present disclosure, the term "A or B" includes "A and B" and "A or B" rather than exclusively including only "A" or only "B" unless specifically stated otherwise.

[0027] Throughout this disclosure, references to "one embodiment" or "some embodiments" mean that a feature, structure, or characteristic described in connection with that embodiment is included in at least one embodiment or at least some embodiments of the disclosure. Thus, the appearance of the phrases "in one embodiment" or "in some embodiments" throughout this disclosure does not necessarily refer to the same embodiment or embodiments. Furthermore, in one or more embodiments, features, structures, or characteristics may be combined in any suitable combinations and / or subcombinations.

[0028] In this disclosure, the word "exemplary" means "serving as an example, instance, or illustration," rather than as a "model" to be precisely copied. Any implementation described as exemplary is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, this disclosure is not to be bound by any expressed or implied theory presented in the preceding technical field, background, summary, or detailed description.

[0029] Additionally, terms such as "first," "second," and the like may also be used in this disclosure for reference purposes only and are not intended to be limiting. For example, the terms "first," "second," and other numerical terms referring to structures or elements do not imply a sequence or order unless the context clearly indicates otherwise.

[0030] It should also be understood that when the term “include / comprises” is used in this disclosure, it indicates the presence of the specified features, integers, steps, operations, units and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, units and / or components and / or their combinations.

[0031] In this disclosure, the terms "component" and "system" are intended to refer to a computer-related entity, or hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process, object, executable state, execution thread, and / or program running on a processor. By way of example, both an application running on a server and the server can be a component. One or more components can exist within an executing process and / or thread, and a component can be located on a computer and / or distributed between two or more computers.

[0032] The inventors of the present application have discovered that when detecting coin properties, it is necessary to combine the information on both the front and back of the coin in order to provide a more accurate detection result. Therefore, it is proposed that after the user inputs the first coin picture, the user is prompted to turn the coin over and take another picture. In addition, the inventors of the present application have also discovered that factors such as the clarity of the picture used to detect coin properties and the size of the coin in the picture are related to the detection results. For example, the clearer the coin in the picture, the more accurate the detection result tends to be. For another example, the larger the area occupied by the coin in the picture, the more details may be shown, and the more accurate the detection result tends to be; but if the area occupied by the coin in the picture is too large, it may cause part of the coin to extend beyond the picture, resulting in information loss and inaccurate detection results. Based on these considerations, the inventors of the present application provide an operating method of an electronic device for detecting coin properties according to various embodiments of the present disclosure.

[0033] Figure 1 is an exemplary flow chart of a method 100 for operating an electronic device for detecting coin attributes according to an embodiment of the present disclosure. The electronic device may be a smartphone, tablet computer, personal computer, or the like. The electronic device may implement method 100 via an application installed thereon. Method 100 may include steps S110 to S160 as described below. It should be understood that in the embodiments, drawings, and claims of the present disclosure, the steps are described in a specific order. However, for any two steps included in the method, if there is no dependency between them, the order of the two steps may be swapped.

[0034] In step S110, a video stream is obtained by the shooting device of the electronic device, and a shooting interface is displayed by the display device of the electronic device. For example, in response to the application used to complete method 100 being started, the shooting device (such as a camera) of the electronic device is turned on to obtain a video stream, and a shooting interface is displayed on a display device (such as a monitor). The shooting interface can be the entire area of ​​the display page of the application, or it can be a partial area of ​​the display page of the application, which is used to display the video stream currently obtained by the shooting device. It should be understood that the video stream displayed in the shooting interface can be an encoded / compressed video stream or an unencoded / compressed original video stream.

[0035] In step S120, an image detection process is performed to ensure that the coin detected in the image frame of the video stream meets the conditions for being captured. For example, the image detection process can detect whether the size, position, clarity, and other characteristics of the coin in the image frame, as well as the degree of shake, stability, and light intensity of the captured image, meet the requirements. If these conditions are not met, the electronic device is adjusted or the user is prompted to make manual adjustments to ensure that the coin detected in the image frame meets the conditions for being captured. It should be understood that the conditions for being captured include conditions that facilitate more accurate detection of the attributes of the coin in the image. In step 130, once the coin detected in the image frame meets the conditions for being captured, the camera is automatically triggered to capture a first image of the coin or prompt the user to capture the first image (for example, by displaying a text prompt on the interface). In response to the first image being captured, the user is prompted to flip the coin over via the display of the electronic device. For example, this can be done by displaying a text prompt on the interface (for example, as shown in FIG8H ), an animated prompt, or by using a mask to cover the capture interface. In step 140, the image detection process is performed again. At step 150, once the coin detected in the image frame meets the conditions for being photographed, the camera is automatically triggered to take a second image of the coin or the user is prompted to take a second image. At step 160, in response to the second image being taken, the attributes of the coin are detected based on the first and second images.

[0036] In this way, method 100 can dynamically detect whether the coin in the picture frame meets the shooting conditions to be identified while the user inputs the coin picture into the application, and automatically adjust the electronic device or prompt the user to make manual adjustments to ensure that the shooting conditions are more easily met; and once the coin is detected in the picture frame and meets the shooting conditions, the coin photo at that time can be immediately taken. In this way, on the one hand, the user does not need to perform a shooting operation (such as pressing a shooting button, etc.) to facilitate user operation, and on the other hand, it can avoid shaking or shifting of the electronic device during the shooting operation, which may cause the captured picture to be unfavorable for better coin detection. In addition, in some embodiments, the user can be prompted to take a picture when it is detected that the coin meets the shooting conditions in the picture frame. In this way, the user can retain the freedom to take the coin picture by himself, and can also make the user take the coin picture that meets the requirements as much as possible.

[0037] In some embodiments, before step 140, a detection is performed to determine whether the coin has been turned over, and in response to the detection result that the coin has been turned over, step 140 is performed. In one example, a neural network model for identifying whether a coin has been turned over can be pre-trained based on artificial intelligence technology. The model can identify whether the coin has been turned over based on a picture of the coin detected in the video frame. In another example, the front and back of the coin can be identified based on an image detection algorithm and the features of the front and back of the coin, thereby determining whether the coin in the video frame has been turned over. If the detection result is that the coin has not been turned over, the user is continued to be prompted to turn the coin over (for example, a different prompting means from the previous one, or an additional prompting means can be used). If the detection result is that the coin has been turned over, step 140 is performed and the image detection process is performed again.

[0038] In some embodiments, an electronic device may provide an operable area (e.g., to serve as a shooting button) during the execution of the image detection process of method 100, and in response to receiving a specific operation via the operable area, a picture may be taken by a camera. The operable area may, for example, be a virtual button on the display page of an application, or a physical button provided on the housing of an electronic device. During the execution of the image detection process, the user may perform a specific operation via the operable area at any time, such as pressing a shooting button to take a picture of the current coin. It should be understood that other known photo triggering technologies, such as voice control, may also be used. At this time, the application may not provide an operable area, but may take a picture via a camera in response to receiving a specific voice. In some embodiments, the operable area may not be provided throughout the execution of the image detection process. For example, the operable area may be provided (or the operation of the operable area is unlocked) only when it is detected that the coin meets the shooting conditions in the picture frame, so that the user can take a picture of the coin that meets the requirements as much as possible.

[0039] FIG2 is an exemplary flow chart of an image detection process 200 in a method 100 for operating an electronic device for detecting coin attributes according to an embodiment of the present disclosure. The image detection process 200 may include steps S210 to S250 as described below. In step S210, the position and size of a coin in an image frame are detected, and the coin's boundaries are indicated in a capture interface during the image detection process. In step S220, in response to the coin's position in the image frame not being within a target position range, a user is prompted, via a display device, to move the coin toward the target position range. In step S230, in response to the coin's size in the image frame not being within the target size range, a camera is physically zoomed to bring the coin's size in the image frame closer to the target size range. In step S240, in response to the physical zoom failing to bring the coin's size in the image frame within the target size range, a user is prompted, via a display device, to move the camera closer to or further away from the coin. In step S250, it is determined that both the coin's position in the image frame and its size in the image frame are within the target size range. In response to the position of the coin in the picture frame being within the target position range and the size of the coin in the picture frame being within the target size range, the image detection process is ended, otherwise the process returns to step S210 to repeat the image detection process.

[0040] In some embodiments, in response to the camera of the electronic device being activated, the electronic device can periodically and continuously detect whether a coin is present in a frame of the video stream, and determine the size and position of the coin in the frame. The detection period can be determined based on the frame rate of the video stream, for example, once every N frames; or it can be determined based on time, for example, once every M milliseconds.

[0041] In some embodiments, the coin's boundaries can be indicated by displaying a frame in the capture interface that at least partially encloses the coin. This frame can include all or one or more portions of a circular frame, a square rectangular frame, or a rounded rectangular frame. Figures 5A and 5B are schematic diagrams of the capture interface 10. As described above, the capture interface 10 is a specific area within the application's display page that displays the video stream currently being captured by the camera. It should be understood that, although not shown, the currently captured video stream can be displayed within the capture interface 10. A frame 20 can also be displayed within the capture interface 10 to indicate the boundaries of the coin in the video, for example, by overlaying a layer on top of the video stream. It should be understood that, although not shown, the area within the frame 20 can include the coin detected in the current video stream. Because the frame 20 encloses the detected coin in the image frame, it not only indicates the coin's position within the image frame, but also its size within the image frame. Because the frame 20 indicates the coin's boundaries within the image frame, it will be referred to as the coin's boundaries 20 below. The frame 20 can be a fully enclosing frame, as shown in FIG5A , or a partially enclosing frame, as shown in FIG5B . It should be understood that, for illustrative purposes, this disclosure lists several forms of the frame 20, but this disclosure is not limited thereto, as long as the position and size of the detected coin can be indicated in the capture interface 10. Since the coin is observable by the user in the capture interface 10, in some embodiments, the coin's boundaries may not be indicated in the capture interface 10, for example, no frame 20 may be displayed surrounding the detected coin.

[0042] The capture interface 10 of FIG5A also shows the target position range and target size range of the coin in the image frame as area 30. In some embodiments, the boundaries of area 30 can be displayed in the capture interface 10 to indicate to the user the target position range and target size range of the coin in the image frame. In this way, the user can adjust the size and position of the coin in the image according to this indication, for example, by moving the camera of the electronic device forward, backward, or left, right, etc. When both area 30 and frame 20 are displayed in the capture interface 10, the user can more intuitively understand the current position / size and target position / size of the coin, thereby facilitating the user's self-adjustment. In some embodiments, the boundaries of area 30 can be omitted from the capture interface 10, that is, the target position range and target size range of the coin in the image frame are not indicated to the user. Instead, the electronic device automatically adjusts (e.g., through physical zoom) and outputs information prompting the user to adjust the position of the electronic device (e.g., prompting the user to place the coin in the center of the image, or prompting the user to move the phone forward, backward, left, or right, etc.) to ensure that the position and size of the coin in the capture interface fall within the target range.

[0043] In some embodiments, whether the coin's position in the image frame is within the target position range can be determined by determining whether the distance between the coin's boundary 20 and the boundary of the capture interface 10 in the capture interface 10 is less than a boundary distance threshold. Whether the distance is less than the threshold can be determined by calculating the screen ratio of the distance. For example, a first ratio H23L / H10 of the distance H23L between the left edge of the coin and the left edge of the photographing interface 10 to the horizontal dimension H10 of the photographing interface 10 may be calculated; a second ratio H23R / H10 of the distance H23R between the right edge of the coin and the right edge of the photographing interface 10 to the horizontal dimension H10 of the photographing interface 10 may be calculated; a third ratio V23U / V10 of the distance V23U between the upper edge of the coin and the upper edge of the photographing interface 10 to the vertical dimension V10 of the photographing interface 10 may be calculated; and a fourth ratio V23D / V10 of the distance V23D between the lower edge of the coin and the lower edge of the photographing interface 10 to the vertical dimension V10 of the photographing interface 10 may be calculated. Four ratio thresholds, such as the first ratio to the fourth ratio, may be predetermined for measuring the above-mentioned first to fourth ratios, so that these four ratio thresholds can be used to determine whether the first to fourth ratios meet the conditions. For example, it can be determined whether the first ratio H23L / H10 is not greater than the first proportion, the second ratio H23R / H10 is not greater than the second proportion, the third ratio V23U / V10 is not greater than the third proportion, and the fourth ratio V23D / V10 is not greater than the fourth proportion. When the first to fourth ratios are all not greater than their respective proportion thresholds, it can be determined that the distance between the boundary 20 of the coin in the capturing interface 10 and the boundary of the capturing interface 10 is less than the boundary distance threshold, that is, the position of the coin in the image frame is considered to be within the target position range.

[0044] In some embodiments, whether the size of the coin in the image frame is within a target size range can be determined by determining whether the screen-to-body ratio of the coin in the capture interface 10 is within a target screen-to-body ratio range. Although referred to as a "screen-to-body ratio," it should be understood that the screen-to-body ratio of the coin may not be a ratio of the entire display screen of the electronic device; for example, it may be a ratio of the coin in the capture interface 10 to the capture interface 10. For example, whether the size of the coin in the image frame is within a target size range can be determined by determining whether the ratio H20 / H10 of the horizontal dimension H20 of the coin's border 20 in the capture interface 10 to the horizontal dimension H10 of the capture interface 10, the ratio V20 / V10 of the vertical dimension V20 of the coin's border 20 in the capture interface 10 to the vertical dimension V10 of the capture interface 10, or the ratio (e.g., H20×V20 / (H10×V10)) of the area enclosed by the coin's border 20 in the capture interface 10 (e.g., H20×V20) to the area of ​​the capture interface 10 (e.g., H10×V10) is within a target range.

[0045] When it is determined that the size of the coin in the image frame is not within the target size range, the camera can be physically zoomed to bring the size of the coin in the image frame closer to the target size range. The magnification or reduction factor for the physical zoom (referred to as the zoom factor) is calculated based on the boundary 20 indicating the coin in the shooting interface 10, the target position range, and the target size range (indicated by area 30). A specific example of the zoom factor will be described below. If the size of the coin in the image frame is still not within the target size range after physical zooming, the user can be prompted by the display device to move the camera closer or further away from the coin. After receiving the prompt, the user may change the position of the camera. During the image detection process 200, the application will repeatedly detect the position and size of the coin in the image frame. If it meets the target range, the photo is automatically taken. If it does not meet the target range, the image detection process 200 is repeated until the position and size of the coin in the image frame meet the target range.

[0046] In some embodiments, when the camera is initially turned on to capture a video stream, the application can set the camera to capture at an initial focal length greater than 1, i.e., to capture the video stream in a magnified form. Simultaneously, the video stream is displayed in the capture interface 10 at a magnification corresponding to the focal length of the camera. For example, as the focal length of the camera changes, the corresponding magnification is displayed in the capture interface 10.

[0047] In some embodiments, the image detection process 200 may also automatically focus. For example, in response to a detected change in the coin's border, it may determine whether the camera's focus is within the coin's border; in response to the camera's focus not being within the coin's border, the camera may be focused on the center of the portion of the coin enclosed by the border.

[0048] In some embodiments, the image detection process 200 further detects the clarity of the coin in the picture frame, performs light intensity detection on the coin in the picture frame, and detects the stability of the image. For example, in some embodiments, the image detection process 200 may further include: determining the clarity of the coin in the picture frame in response to the coin's position in the picture frame being within a target position range and the coin's size in the picture frame being within a target size range; terminating the image detection process in response to the coin's position in the picture frame being within the target position range, the coin's size in the picture frame being within the target size range, and the clarity condition being satisfied; otherwise, repeating the image detection process. In some embodiments, the image detection process 200 may further include: performing light intensity detection on the coin in the picture frame before capturing the first or second picture of the coin, and adjusting the exposure value based on the detected light intensity; and capturing the first or second picture of the coin using a camera in response to the light intensity of the coin in the picture frame satisfying the condition. In some embodiments, the image detection process 200 may further include: in response to a change in the detected boundary of the coin, determining whether the distance between the center of the portion enclosed by the boundary of the coin detected this time and the center of the portion enclosed by the boundary of the coin detected last time is less than a center distance threshold; in response to the distance being not less than the center distance threshold, initializing the stability value to an initial stability value; and in response to the distance being less than the threshold, incrementing the stability value; in response to the position of the coin in the picture frame being within a target position range, the size of the coin in the picture frame being within a target size range, and the stability value being greater than the threshold, terminating the image detection process, otherwise repeating the image detection process. Whether the distance is less than the threshold can be determined by determining whether the ratio of the distance to the diagonal length of the shooting interface is less than the center distance threshold.

[0049] In some embodiments, the image detection process may include: detecting the position and size of the coin in the picture frame; in response to the size of the coin in the picture frame not being within a target size range, prompting the user via a display device to move the camera closer to or further away from the coin; in response to the position of the coin in the picture frame not being within a target position range, prompting the user via a display device to move the coin toward the target position range and initializing the stabilization value to an initial stabilization value; in response to the focus of the camera not being within the boundary of the coin, focusing the camera on the center of the portion surrounded by the boundary of the coin; In response to the distance between the center of the portion enclosed by the boundary of the coin detected this time and the center of the portion enclosed by the boundary of the coin detected last time being not less than the center distance threshold, the stability value is initialized to the initial stability value, and the image detection process is repeated; in response to the distance being less than the center distance threshold, the stability value is incremented; in response to the stability value being not greater than the first stability threshold, the image detection process is repeated; in response to the stability value being greater than the first stability threshold, the zoom factor is determined and adjusted and the stability value is incremented; in response to the stability value being not greater than a second stability threshold that is greater than the first stability threshold, the focus is adjusted to refocus on the center of the detected coin, and the image detection process is repeated; in response to the stability value being greater than the second stability threshold, the image detection process is ended. A specific example of the image detection process in these embodiments, namely, the image detection process 300, is described below in conjunction with Figures 3A to 3C. Figures 3A to 3C show an exemplary flow chart of the image detection process 300. The flowchart is divided into three parts. The first part 300 - P1 of the image detection process 300 is shown in FIG. 3A , the second part 300 - P2 is shown in FIG. 3B , and the third part 300 - P3 is shown in FIG. 3C .

[0050] As shown in Figure 3A, image detection is performed based on the picture frames (also referred to as video frames) in the video stream obtained by the shooting device (such as a camera). The degree of shaking is first detected, that is, whether the shooting device is stable. When the degree of shaking is, for example, less than or equal to 0.1, it can be judged to be stable, and the process of detecting the screen ratio of the coin in the picture frame can be entered, otherwise the video frame is reacquired. To detect the screen ratio, it is necessary to first detect the position and size of the coin in the picture frame, which can be done by a trained neural network model. For example, the position and size of the coin can be dynamically detected every 100 milliseconds or every 125 milliseconds, and the coin can be framed with a frame indicating the detected coin, such as the rounded rectangular frame 20 shown in Figure 5A (hereinafter referred to as the coin frame).

[0051] The screen-to-body ratio can be, for example, the ratio of the width (horizontal dimension) of the coin frame (for example, the width and height can be equal) to the width of the shooting interface (for example, the range of the entire viewfinder), or it can be the ratio of the height (vertical dimension) of the coin frame to the height of the shooting interface. Since coins are usually round in practice, the coin frame is usually equal in width and height, and the shooting interface usually has different widths and heights depending on the size of the display screen of the electronic device, so the screen-to-body ratio can be calculated based on the smaller of the width and height of the shooting interface. For example, if the horizontal dimension of the shooting interface is smaller than the vertical dimension, the ratio of the width of the coin frame to the width of the shooting interface is used as the screen-to-body ratio. In addition, it can also be the ratio of the areas of the two. Preferably, a unified method is used to calculate the screen-to-body ratio during the execution of the entire image detection process 300. The target size range of the coin in the picture frame can be determined as a screen-to-body ratio between 0.22 and 0.7. Too small or too large is not conducive to the detection of coin attributes. Therefore, when the screen-to-body ratio is less than or equal to 0.22, a prompt is given to the user to move the camera closer to the coin. When the screen-to-body ratio is greater than or equal to 0.7, a prompt is given to move the camera further away from the coin. In both cases, the process returns to the beginning of image detection process 300, i.e., image detection process 300 is repeated. If the screen-to-body ratio is between 0.22 and 0.7, the following process is continued.

[0052] As shown in FIG3B , a determination is made as to whether the position of the coin in the image frame is within the target position range to prevent the coin from being too close to the border of the shooting interface. For example, the distance between the coin border in the image frame and the border of the shooting interface is determined to be greater than a border distance threshold, such as determining whether the screen-to-body ratio of the distance is greater than 0.05. As described above, calculations can be performed for the top, bottom, left, and right borders of the coin, such as the ratios V23U / V10, V23D / V10, H23L / H10, and H23R / H10 described above with reference to FIG5A , and then determining whether each of these four ratios is greater than the border distance threshold. Alternatively, the smallest value of the distances between the top, bottom, left, and right borders of the coin and the corresponding border of the shooting interface can be determined first. For example, in the example shown in FIG5A , the distance between the right border of the coin and the corresponding border of the shooting interface is the smallest. In this case, it is only necessary to determine whether the ratio H23R / H10 of the distance between the right border of the coin and the right border of the shooting interface is greater than the border distance threshold. If the distance between the boundaries is not greater than the boundary distance threshold, the user is prompted to move the coin to the target position range, for example, to move the coin to the middle, and the stability value is initialized to an initial stability value, for example, 0. If the distance between the boundaries is greater than the boundary distance threshold, the following process is continued.

[0053] Determine whether the current focus of the camera (for example, the center of the focus frame after the last focus) is inside the frame of the currently detected coin area to determine whether refocusing is required. If the focus is not inside the coin frame, it means that it has moved a lot, and you need to refocus, for example, focus the camera on the center of the part surrounded by the boundary of the coin. At the same time, determine whether the ratio between the size of the line connecting the center points of the coin frame detected this time and the coin frame detected last time (that is, the coin frame detected twice in a row) (that is, the distance between the centers of the two coin frames) and the diagonal line of the shooting interface is less than the center distance threshold, for example, whether it is less than 0.1. If it is greater than 0.1, it is considered that there is a lot of movement, and the stability value is set to the initial value 0 to return to the beginning of the image detection process 300; if it is less than 0.1, it is considered stable, and the stability value is increased by 1.

[0054] As shown in Figure 3C, it is determined whether the electronic device supports the clarity recognition function based on the system version. For example, if the version above iOS 14 supports it, then the process of determining whether the clarity meets the standard is started. For example, it can be determined whether the clarity exceeds a set threshold, such as a clarity threshold of 0.98. If the clarity does not meet the standard, the process returns directly to the beginning of the image detection process 300. If the electronic device does not support the clarity recognition function, the stability value is determined. When the stability value is greater than or equal to 2, the process proceeds to the next step. If the stability value is less than 2, the process returns to the beginning of the image detection process 300 to repeat the image detection process 300 until the accumulated stability value is greater than or equal to 2 to enter the subsequent process of determining and adjusting the zoom factor.

[0055] The zoom factor can be calculated based on the boundary of the coin indicated in the shooting interface, the target position range, and the target size range. For example, the optimal screen ratio can be preset. For example, the optimal screen ratio can be set to 0.5, that is, the optimal value of the ratio of the height of the coin frame to the height of the shooting interface (referred to as the optimal height screen ratio) is 0.5, and the optimal value of the ratio of the width of the coin frame to the width of the shooting interface (referred to as the optimal width screen ratio) is also 0.5. In some embodiments, the optimal width screen ratio and the optimal height screen ratio may not be equal. Then a preliminary zoom factor is calculated based on the size of the coin in the picture frame. For example, the width zoom factor W = optimal width screen ratio / coin width screen ratio, the height zoom factor H = optimal height screen ratio / coin height screen ratio, and the smaller value of W and H is taken as the first zoom factor zoom1 = min(W, H). Among them, the coin width screen ratio is the ratio of the width of the coin frame to the width of the shooting interface (for example, H20 / H10 in Figure 5A), and the coin height screen ratio is the ratio of the height of the coin frame to the height of the shooting interface (for example, V20 / V10 in Figure 5A).

[0056] The second zoom factor, zoom2, is then calculated based on the coin boundary. The process of calculating the second zoom factor, zoom2, is described below using a specific example with reference to FIG6 . FIG6 illustrates the coin boundary (e.g., box 20 in FIG5A ), the target position range boundary (e.g., the boundary of area 30 in FIG5A ), and the left and right boundaries of the capture interface (e.g., the boundary of capture interface 10 in FIG5A ). The x-axis represents the horizontal direction (width), and the y-axis represents the vertical direction (height). The coordinate values ​​represent the screen-to-body ratio (i.e., the proportion of the point in the entire capture interface). Therefore, the coordinate value of the left boundary of the capture interface is 0, and the coordinate value of the right boundary is 1. The distance marked as a screen-to-body ratio value of 0.1 in FIG6 , hereinafter referred to as "self.BestDistance," is the distance between the target position range boundary and the corresponding boundary of the configuration interface (e.g., H1 and H2 in FIG5A ). In the example shown in FIG6 , the self.BestDistance values ​​on the left and right sides are equal. It should be understood that in other examples, the self.BestDistance values ​​on the left and right sides may not be equal. Similarly, the self.BestDistance values ​​for the upper and lower sides (e.g., V1 and V2 in FIG. 5A ) can also be preset. The self.BestDistance values ​​for the upper and lower sides can be equal or different from each other, and the self.BestDistance values ​​for the upper and lower sides can be equal or different from the self.BestDistance values ​​for the left and right sides. For simplicity, FIG. 6 only shows the case where the self.BestDistance values ​​for the left and right sides are equal. self.BestDistance = 0.1 means that when the coin area is magnified to the maximum, a distance of 0.1 screen ratio is required on both sides.

[0057] Use dx and dy to represent the minimum available distance ratio from the current coin boundary to the boundary of the shooting interface (the calculation of dx and dy will be introduced in detail below), and calculate the horizontal zoom factor and the vertical zoom factor respectively. For the sake of simplicity, Figure 6 only shows the calculation method of the horizontal magnification factor. Based on this example, those skilled in the art can obtain the calculation method of the horizontal reduction factor, the vertical magnification factor, and the vertical reduction factor. In the example of Figure 6, the horizontal magnification factor = (2dx + coin width screen ratio) / coin width screen ratio. Similarly, the vertical magnification factor = (2dy + coin height screen ratio) / coin height screen ratio. Then determine the second zoom factor zoom2 as the smaller value of the horizontal magnification factor and the vertical magnification factor, that is, zoom2 = min (horizontal magnification factor, vertical magnification factor).

[0058] Calculate dx and dy using the formulas dx = min(leftTop.x - self.BestDistance, 1 - rightBottom.x - self.BestDistance) and dy = min(leftTop.y - self.BestDistance, 1 - rightBottom.y - self.BestDistance). Here, leftTop.x and leftTop.y are the horizontal and vertical coordinates of the top left corner of the coin's boundary, respectively, while rightBottom.x and rightBottom.y are the horizontal and vertical coordinates of the bottom right corner of the coin's boundary, respectively. For dx, calculate the maximum distance the coin can expand to, since the coin may be closer to the left or right. For the left side, calculate leftTop.x - self.BestDistance, and for the right side, calculate 1 - rightBottom.x - self.BestDistance. Take the smaller of the two calculated values ​​to ensure that the coin does not expand beyond the optimal boundary. dy is calculated using the same principle.

[0059] Then, the first zoom factor, zoom1, calculated based on the size of the coin, is compared with the second zoom factor, zoom2, calculated based on the position (boundary) of the coin, and the smaller value is taken as the calculated zoom factor, zoom. In some embodiments, when zoom < 1.2 and zoom > 0.7, the zoom value is set to 0, i.e., no zooming is performed. Then, the zooming is performed according to the calculated zoom value.

[0060] In some embodiments, the entire shooting adjustment magnification can also be set to be limited between 1.6 and 3, that is, the default minimum magnification for shooting is 1.6 times (that is, when the shooting button is turned on to enter the shooting interface, it is already magnified 1.6 times by default). For example, if the zoom is set to 0 in the previous step, the magnification process is actually still performed according to the default minimum magnification of 1.6, that is, the basic magnification value is calculated according to 1.6. If the zoom value calculated in the previous step is 2, the actual magnification is 1.6×2=3.2, which exceeds the set upper limit of 3 at this time, so the magnification is limited to 3 for subsequent processing. In some embodiments, the lower limit of the magnification can be fixed at 1.6 (that is, when the zoom is less than 1, the magnification is still 1.6). In other embodiments, the limit on the lower limit of the magnification can also be released. For example, if the maximum screen-to-body ratio is 0.75, the process begins. 0.5 / 0.75 = 0.667, which means the viewfinder needs to be zoomed out. 0.667 × 1.6 = 1.0672, essentially zooming out to 1x, the minimum normal 1x focal length for the viewfinder. Furthermore, you can limit the magnification factor between 1 and 3, with the default being 1x for normal shooting. Zooming out at a value less than 1 will still be handled at 1x, and exceeding the zoom limit will be handled at the maximum supported by the camera, such as 3x.

[0061] The process then proceeds to determine whether the stability value is greater than or equal to 4 times. If less than 4 times, the process returns to the beginning of process 300 and, after a series of processes, calculates the magnification for this time. For example, if the magnification calculated in the first calculation is 2 and the magnification calculated in the second focus is also 2, the corresponding original magnification becomes 1.6×2=3.2. The first magnification exceeds 3, and the second magnification is 3×2=6. This exceeds the upper limit of 3, and the actual magnification is adjusted to the original magnification of 3. If the first magnification is 1 and the second is 2, the first magnification is 1.6 times, and the second is 2×1.6=3.2. This also exceeds the upper limit of 3, and the actual magnification is adjusted to the original magnification of 3. When the stability value is greater than or equal to 4 times, the photo is taken (the magnification calculation and processing are required each time). Including the two stability value determinations previously set, the entire process actually requires at least 8 stabilization times. In some embodiments, light intensity detection is performed during each shot, and the exposure EV value is automatically adjusted based on the light intensity. When the light intensity meets the shooting conditions, the coin is automatically photographed.

[0062] FIG4 is an exemplary flow chart of an operation method 400 of an electronic device for detecting coin attributes according to an embodiment of the present disclosure. In these embodiments, the operation method of the electronic device for detecting coin attributes includes: step S410: obtaining a video stream through the shooting device of the electronic device (for example, the initial focal length can be set so that the displayed image in the shooting interface is magnified by 1.6 times by default), and displaying the shooting interface through the display device of the electronic device, and displaying the video stream in the shooting interface with a magnification corresponding to the shooting focal length of the shooting device; step S420: displaying a frame in the shooting interface to indicate the target position range of the coin in the picture frame of the video stream, so that the user can try to include the coin in the frame by operating the electronic device; step S430: placing the coin in the shooting interface; The focus of the device photographing is aligned with the center of the frame. In the methods of these embodiments, the application can stabilize the focus at the center of the frame (for example, focusing on an object located at the center of the frame) without having to frequently perform object detection and refocusing; step S440: in response to receiving a specific operation via the operable area of ​​the electronic device, taking a first picture of the coin by the photographing device; step S450: prompting the user to turn the coin over through the display device, and in response to receiving a specific operation via the operable area, taking a second picture of the coin by the photographing device; and step S460: detecting the properties of the coin based on the first picture and the second picture.

[0063] It should be noted that the present disclosure does not limit the order in which the front and back sides of a coin are photographed. For example, the first picture may be a picture of the front side of the coin, and the second picture may be a picture of the back side of the coin; or the first picture may be a picture of the back side of the coin, and the second picture may be a picture of the front side of the coin. It should be noted that the "front" or "back" of a coin referred to herein does not distinguish between the actual front and back of the coin, but only refers to one side of the coin and the other side opposite thereto (for the sake of simplicity of language). Taking the two pictures of the coin shown in Figure 7 as an example, the side of the image on the left (the side with the person) is usually referred to as the front side of the coin, and the side of the image on the right (the side with the building) is referred to as the back side of the coin. However, in this article, the image on the left side of Figure 7 may be referred to as the front image of the coin, and the image on the right may be referred to as the back image of the coin; the image on the left may also be referred to as the back image of the coin, and the image on the right may be referred to as the front image of the coin.

[0064] Figures 8A to 8H are schematic diagrams of a shooting interface in an operating method of an electronic device for detecting coin attributes according to an embodiment of the present disclosure. The shooting interface is displayed on a display device of the electronic device, and a video stream captured by the shooting device is displayed in the shooting interface. As shown in the figure, a frame is displayed in the shooting interface to indicate the target position range of the coin in the image frame of the video stream. The frame can be a rectangular frame as shown in Figure 8D, or a circular frame as shown in the other figures. A cross mark can be used to indicate the position of the autofocus focal point, for example, as shown in Figures 8A or 8C, indicating that the autofocus focal point is located at the center of the frame. The shooting interface can also display the current magnification factor, such as the magnification factor indicator bar in the lower right corner of the shooting interface in Figures 8B to 8H. At the beginning of shooting, the user can be prompted to shoot the front side of the coin first and then the back side (or vice versa), or to shoot both sides of the coin, as shown in Figures 8A and 8C. Alternatively, the user can be prompted to simply place the coin within the frame for focusing, as shown in Figure 8B. When the coin in the video frame is unclear or too large / too small, text can be displayed to prompt the user to perform corresponding operations, such as prompting the user to move the camera to focus (as shown in Figure 8E), or prompting the user to move the camera closer (as shown in Figure 8F), etc. When the position and size of the coin in the video frame meet the conditions for the picture to be taken, the user can be prompted by text that the picture can be taken at this time, as shown in Figure 8G. The user can take a picture of the coin by operating the shooting button area below the shooting interface (and / or pressing the physical shooting button of the electronic device). In some embodiments, the operation of the shooting button area and / or the operation of the physical shooting button can be unlocked only when the shooting conditions are met, that is, the shooting button area and / or the physical shooting button can be operated to take a picture only when the position and size of the coin in the video frame meet the conditions for the picture to be taken. After completing the picture shooting of the first side of the coin, the user can be prompted to turn the coin over in the shooting interface, as shown in Figure 8H.

[0065] FIG9 is a block diagram schematically illustrating at least a portion of an electronic device 500 for detecting coin attributes according to an embodiment of the present disclosure. The electronic device 500 includes one or more processors 510, one or more memories 520, and other components (not shown) typically found in devices such as computers. Each of the one or more memories 520 can store content accessible by the one or more processors 510, including instructions 521 executable by the one or more processors 510 and data 522 that can be retrieved, manipulated, or stored by the one or more processors 510.

[0066] Instructions 521 may be any set of instructions to be executed directly by one or more processors 510, such as machine code, or any set of instructions to be executed indirectly, such as a script. The terms "instructions," "application," "process," "steps," and "program" in this disclosure may be used interchangeably in this disclosure. Instructions 521 may be stored in object code format for direct processing by one or more processors 510, or as a script or collection of independent source code modules in any other computer language, including those interpreted on demand or compiled in advance. Instructions 521 may include instructions that cause one or more processors 510, for example, to act as the various neural networks of the present disclosure. The functions, methods, and routines of instructions 521 are explained in more detail elsewhere in this disclosure.

[0067] The one or more memories 520 may be any temporary or non-temporary computer-readable storage medium capable of storing content accessible by the one or more processors 510, such as a hard drive, a memory card, a ROM, a RAM, a DVD, a CD, a USB memory, a writable memory, and a read-only memory. One or more of the one or more memories 520 may include a distributed storage system, in which instructions 521 and / or data 522 may be stored on multiple different storage devices that may be physically located in the same or different geographic locations. One or more of the one or more memories 520 may be connected to the one or more first devices 510 via a network, and / or may be directly connected to or incorporated into any of the one or more processors 510.

[0068] One or more processors 510 may retrieve, store, or modify data 522 according to instructions 521. Although the subject matter described in this disclosure is not limited to any particular data structure, data 522 may also be stored in computer registers (not shown), as a table with many different fields and records, or in a relational database as an XML document. Data 522 may be formatted in any computing device readable format, such as, but not limited to, binary values, ASCII, or Unicode. In addition, data 522 may include any information sufficient to identify the relevant information, such as a number, descriptive text, proprietary code, a pointer, a reference to data stored in other storage such as another network location, or information used by a function to calculate the relevant data.

[0069] The one or more processors 510 may be any conventional processor, such as a commercially available central processing unit (CPU), a graphics processing unit (GPU), or the like. Alternatively, the one or more processors 510 may also be specialized components, such as an application-specific integrated circuit (ASIC) or other hardware-based processor. Although not required, the one or more processors 510 may include specialized hardware components to perform specific computing processes more quickly or more efficiently, such as performing image processing on picture frames of a video stream.

[0070] Although FIG9 schematically illustrates one or more processors 510 and one or more memories 520 within the same box, the electronic device 500 may actually include multiple processors or memories that may reside within the same physical housing or within different physical housings. For example, any one of the one or more memories 520 may be a hard drive or other storage medium located in its own housing. Therefore, references to a processor, a computer, a computing device, or a memory should be understood to include references to a collection of processors, computers, computing devices, or memories that may or may not operate in parallel.

[0071] FIG10 is an exemplary block diagram of a general hardware system 600 applicable according to an embodiment of the present disclosure. System 600 will now be described with reference to FIG10 , which is an example of a hardware device applicable to various aspects of the present disclosure. Electronic device 500 may include all or part of system 600. System 600 may be any machine configured to perform processing and / or computing, and may be, but is not limited to, a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal data assistant, a smartphone, an in-vehicle computer, or any combination thereof.

[0072] The system 600 may include components that may be connected to or in communication with the bus 602 via one or more interfaces. For example, the system 600 may include the bus 602, one or more processors 604, one or more input devices 606, and one or more output devices 608. The one or more processors 604 may be any type of processor, including but not limited to one or more general-purpose processors and / or one or more special-purpose processors (e.g., special processing chips). Each process, operation, and / or step in the method described above may be implemented by executing instructions by the one or more processors 604.

[0073] Input device 606 may be any type of device that can input information to a computing device, including but not limited to a webcam, mouse, keyboard, touch screen, microphone, and / or remote control. Output device 608 may be any type of device that can present information, including but not limited to a display, speaker, video / audio output terminal, vibrator, and / or printer.

[0074] The system 600 may also include or be connected to a non-transitory storage device 610. The non-transitory storage device 610 may be any storage device that is non-transitory and can implement data storage, and may include, but is not limited to, a disk drive, an optical storage device, a solid-state memory, a floppy disk, a hard disk, a magnetic tape or any other magnetic medium, an optical disk or any other optical medium, a ROM (read-only memory), a RAM (random access memory), a cache memory, and / or any other memory chip / chipset, and / or any other medium from which a computer can read data, instructions, and / or code. The non-transitory storage device 610 may be detachable from the interface. The non-transitory storage device 610 may have data / instructions / code for implementing the above-described methods, operations, steps, and processes.

[0075] The system 600 may also include a communication device 612. The communication device 612 may be any type of device or system capable of communicating with an external device and / or with a network, and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication device, and / or a chipset, such as a Bluetooth device, an 802.11 device, a WiFi device, a WiMax device, a cellular communication device, a satellite communication device, and / or the like.

[0076] The bus 602 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus. Specifically, for in-vehicle devices, the bus 602 may also include a Controller Area Network (CAN) bus or other architectures designed for use in vehicles.

[0077] System 600 may also include working memory 614 , which may be any type of working memory that can store instructions and / or data useful for operation of processor 604 , and may include, but is not limited to, random access memory and / or read-only storage devices.

[0078] Software elements may be located in the working memory 614, including but not limited to an operating system 616, one or more application programs 618, drivers, and / or other data and code. Instructions for executing the above-described methods, processes, operations, and steps may be included in one or more application programs 618. The executable code or source code of the instructions of the software elements may be stored in a non-transitory computer-readable storage medium, such as the storage device 610 described above, and may be read into the working memory 614 through compilation and / or installation. The executable code or source code of the instructions of the software elements may also be downloaded from a remote location.

[0079] It should also be understood that changes can be made according to specific requirements. For example, customized hardware can also be used, and / or specific elements can be implemented with hardware, software, firmware, middleware, microcode, hardware description language or any combination thereof. In addition, connections with other computing devices such as network input / output devices can be adopted. For example, some or all of the methods or devices according to the embodiments of the present disclosure can be implemented by programming hardware (for example, including a field programmable gate array (FPGA) and / or a programmable logic array (PLA)) using logic and algorithms according to the present disclosure, in assembly language or hardware programming languages ​​(such as VERILOG, VHDL, C++).

[0080] It should also be understood that the components of system 600 can be distributed across a network. For example, some processing can be performed by one processor, while other processing can be performed by another processor remote from the one processor. Other components of system 600 can also be similarly distributed. In this way, system 600 can be interpreted as a distributed computing system that performs processing at multiple locations.

[0081] Although various aspects of the present disclosure have been described so far with reference to the accompanying drawings, the above-described methods, systems, and devices are merely illustrative examples, and the scope of the present disclosure is not limited by these aspects, but is limited only by the following aspects: the appended claims and their equivalents. Various elements may be omitted or replaced with equivalent elements. In addition, the steps may be performed in an order different from the order described in this disclosure. Furthermore, the various elements may be combined in various ways. It is also important to note that as technology develops, many of the elements described may be replaced by equivalent elements that become available after this disclosure.

Claims

1. A method for operating an electronic device for detecting coin attributes, include: Obtaining a video stream through a shooting device of the electronic device, and displaying a shooting interface through a display device of the electronic device; performing an image detection process so that the coins detected in the picture frames of the video stream meet the conditions of the captured picture; Once the coin detected in the picture frame meets the conditions for being photographed, the photographing device is automatically triggered to photograph a first picture of the coin or prompt the user to photograph the first picture, and in response to the first picture being photographed, the display device of the electronic device prompts the user to turn the coin over; Execute the image detection process again; Once the coin detected in the picture frame meets the conditions for being photographed, the photographing device is automatically triggered to take a second picture of the coin or the user is prompted to take a second picture; as well as In response to the second picture being taken, the properties of the coin are detected based on the first picture and the second picture.

2. The method according to claim 1, in, The image detection process includes: detecting the position and size of the coin in the picture frame and indicating the boundaries of the coin in the photographing interface during the image detection process; In response to the position of the coin in the picture frame not being within the target position range, prompting the user to move the coin to the target position range through the display device; In response to the size of the coin in the picture frame not being within the target size range, physically zooming the camera to make the size of the coin in the picture frame closer to the target size range; In response to the physical zoom failing to make the size of the coin in the picture frame within the target size range, prompting the user through the display device to move the camera closer to or further away from the coin; and In response to the position of the coin in the picture frame being within the target position range and the size of the coin in the picture frame being within the target size range, the image detection process is terminated, otherwise the image detection process is repeatedly executed.

3. The method according to claim 1, further comprising: include: When the camera is initially turned on to obtain a video stream, the camera is set to shoot at an initial focal length, where the initial focal length is greater than 1; as well as The video stream is displayed in the shooting interface at a magnification corresponding to the focal length of the shooting device.

4. The method according to claim 2, in, The boundary of the coin is indicated by displaying a frame at least partially surrounding the coin in the shooting interface, wherein the frame includes all, a part or multiple parts of any one of a circular frame, a square rectangular frame and a rounded rectangular frame.

5. The method according to claim 2, in, Whether the position of the coin in the picture frame is within the target position range is determined by judging whether the distance between the boundary of the coin in the shooting interface and the boundary of the shooting interface is less than a boundary distance threshold.

6. The method according to claim 5, in, The following process is performed to determine whether the distance between the boundary of the coin and the boundary of the shooting interface is less than the boundary distance threshold: Calculating a first ratio of a distance between a left edge of the coin and a left edge of the shooting interface to a lateral dimension of the shooting interface; Calculating a second ratio of a distance between a right edge of the coin and a right edge of the shooting interface to a lateral dimension of the shooting interface; Calculating a third ratio of a distance from an upper boundary of the coin to an upper boundary of the shooting interface to a longitudinal dimension of the shooting interface; calculating a fourth ratio of a distance from a lower boundary of the coin to a lower boundary of the shooting interface to a longitudinal dimension of the shooting interface; In response to the first ratio being not greater than the first proportion, the second ratio being not greater than the second proportion, the third ratio being not greater than the third proportion and the fourth ratio being not greater than the fourth proportion, it is judged that the distance between the boundary of the coin in the shooting interface and the boundary of the shooting interface is less than the boundary distance threshold.

7. The method according to claim 2, in, Whether the size of the coin in the picture frame is within the target size range is determined by judging whether the screen ratio calculated as follows is within the target screen ratio range: The ratio of the lateral dimension of the border of the coin in the photographing interface to the lateral dimension of the photographing interface; The ratio of the longitudinal dimension of the border of the coin in the photographing interface to the longitudinal dimension of the photographing interface; or The ratio of the area of ​​the coin enclosed by the border in the shooting interface to the area of ​​the shooting interface.

8. The method according to claim 2, in, The magnification or reduction factor of the physical zoom is calculated based on the boundary of the coin indicated in the shooting interface, the target position range, and the target size range.

9. The method according to claim 2, in, The image detection process also includes: In response to the position of the coin in the picture frame being within the target position range and the size of the coin in the picture frame being within the target size range, determining a clarity of the coin in the picture frame; In response to the position of the coin in the picture frame being within the target position range, the size of the coin in the picture frame being within the target size range and the clarity meeting the conditions, the image detection process is terminated, otherwise the image detection process is repeatedly executed.

10. The method according to claim 1, in, Also includes: Before taking the first picture or the second picture of the coin, performing light intensity detection on the coin in the picture frame, and adjusting the exposure value according to the detected light intensity; In response to the light intensity of the coin in the picture frame satisfying a condition, the first picture or the second picture of the coin is taken by the photographing device.

11. The method according to claim 1, in, Prompt the user to flip the coin by covering the shooting interface with a mask.

12. The method of claim 1 , further comprising during execution of the image detection process: providing an operable area by the electronic device; and In response to receiving a specific operation via the operable area, a picture is taken by the photographing device.

13. The method according to claim 2, in, The image detection process also includes: In response to the detected change in the boundary of the coin, determining whether the focus of the camera is within the boundary of the coin; In response to the focus of the camera being not within the border of the coin, the camera is focused on the center of the portion surrounded by the border of the coin.

14. The method according to claim 1, in, The image detection process also includes: In response to the detected coin boundary change, determining whether the distance between the center of the portion surrounded by the boundary of the coin detected this time and the center of the portion surrounded by the boundary of the coin detected last time is less than a center distance threshold; In response to the distance being not less than a center distance threshold, initializing the stable value to an initial stable value; and in response to the distance being less than a threshold, incrementing the stable value; In response to the position of the coin in the picture frame being within the target position range, the size of the coin in the picture frame being within the target size range and the stable value being greater than a threshold, the image detection process is terminated, otherwise the image detection process is repeatedly executed.

15. The method according to claim 14, in, Whether the distance is less than the threshold is determined by determining whether the ratio of the distance to the diagonal length of the shooting interface is less than the center distance threshold.

16. A method of operating an electronic device for detecting a coin attribute, include: Obtaining a video stream through a shooting device of the electronic device, and displaying a shooting interface through a display device of the electronic device; An image detection process is performed so that the coins detected in the picture frame of the video stream meet the conditions of the captured picture, the image detection process comprising: Detect the position and size of the coin in the image frame; In response to the size of the coin in the picture frame not being within the target size range, prompting the user through the display device to move the camera closer to or further away from the coin; In response to the position of the coin in the picture frame not being within the target position range, prompting the user to move the coin to the target position range through the display device, and initializing the stability value to an initial stability value; In response to the focus of the camera not being within the border of the coin, focusing the camera on the center of the portion surrounded by the border of the coin; In response to the distance between the center of the portion surrounded by the boundary of the coin detected this time and the center of the portion surrounded by the boundary of the coin detected last time being not less than the center distance threshold, the stability value is initialized to the initial stability value, and the image detection process is repeated; in response to the distance being less than the center distance threshold, the stability value is incremented; In response to the stability value not being greater than the first stability threshold, returning to repeatedly execute the image detection process; in response to the stability value being greater than the first stability threshold, determining and adjusting the zoom factor and incrementing the stability value; In response to the stability value being not greater than a second stability threshold greater than the first stability threshold, adjusting the focus to refocus on the center of the detected coin, and returning to repeatedly perform the image detection process; in response to the stability value being not greater than a second stability threshold greater than the first stability threshold, adjusting the focus to refocus on the center of the detected coin, and returning to repeatedly perform the image detection process; The fixed value is greater than the second stable threshold, and the image detection process is terminated; Once the coin detected in the picture frame meets the conditions for being photographed, the photographing device is automatically triggered to photograph a first picture of the coin or prompt the user to photograph the first picture, and in response to the first picture being photographed, the display device of the electronic device prompts the user to turn the coin over; executing the image detection process again; and Once the coin detected in the picture frame meets the conditions for the picture to be taken, the shooting device is automatically triggered to take a second picture of the coin or prompt the user to take a second picture, and in response to the second picture being taken, the properties of the coin are detected based on the first picture and the second picture.

17. A method of operating an electronic device for detecting a coin attribute, include: Obtaining a video stream through a shooting device of the electronic device, and displaying a shooting interface through a display device of the electronic device, and displaying the video stream in the shooting interface at a magnification corresponding to the shooting focal length of the shooting device; Displaying a box in the shooting interface to indicate the target position range of the coin in the picture frame of the video stream; Aligning the focus of the image captured by the camera to the center of the frame; In response to receiving a specific operation via the operable area of ​​the electronic device, taking a first picture of the coin by the photographing device; prompting the user to turn over the coin through the display device, and in response to receiving a specific operation through the operable area, taking a second picture of the coin through the camera; as well as The properties of the coin are detected based on the first image and the second image.

18. An electronic device for detecting the properties of a coin, include: one or more processors; as well as one or more memories configured to store a series of computer-executable instructions, Wherein, when the series of computer-executable instructions are executed by the one or more processors, the one or more processors are caused to perform the method as described in any one of claims 1-17.

19. A non-transitory computer-readable storage medium, It is characterized in that The non-transitory computer-readable storage medium stores a series of computer-executable instructions, and when the series of computer-executable instructions are executed by one or more computing devices, the one or more computing devices are caused to perform the method as described in any one of claims 1-17.

Citation Information

Patent Citations

  • Recognition device of two-sided images of coin and recognition method thereof

    CN102610020A

  • Image based coin detection-identification method and system and storage medium

    CN110415425A

  • Coin identification device and coin identification method

    JP2015060564A

  • Image taking apparatus execute shooting control depending on face location

    US20080309788A1

  • Method for automatically detecting and photographing face image

    US20200293752A1