CN-121982316-A - Image detection method and image detection system
Abstract
The invention provides an image detection method and an image detection system. The image detection method comprises the steps of obtaining a detection image through a camera, calculating the width and the height of a view field range corresponding to the detection image through a processor according to the horizontal view field angle and the vertical view field angle of the camera, calculating the width and the height of each pixel through the processor according to the number of pixels of the width and the number of pixels of the height of the detection image and the width and the height of the view field range, determining a cutting range in the detection image through the processor according to the width and the height of each pixel, cutting the detection image through the processor according to the cutting range to generate a cutting image, and inputting the cutting image into a character detection model through the processor so that the character detection model outputs a character detection result. Therefore, an effective image detection function can be realized.
Inventors
- Guo Wangdingzhi
Assignees
- 威盛电子(深圳)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260126
Claims (20)
- 1. An image detection method is characterized by comprising the following steps: Obtaining a detection image through a camera; calculating the width and the height of a field range corresponding to the detected image according to the horizontal field angle and the vertical field angle of the camera through a processor; Calculating, by the processor, a width per pixel and a height per pixel according to the number of width pixels and the number of height pixels of the detected image and the width and the height of the field of view range; determining, by the processor, a clipping range in the detected image according to the per-pixel width and the per-pixel height; cutting, by the processor, the detected image according to the cutting range to generate a cut image, and Inputting the cut image to the character detection model through the processor so that the character detection model outputs a character detection result.
- 2. The image detection method according to claim 1, wherein the processor obtains an image scale and a diagonal angle of view of the detected image according to the camera, and calculates the horizontal angle of view and the vertical angle of view according to the image scale and the diagonal angle of view.
- 3. The image detection method according to claim 1, wherein the processor selects a detection center in the detected image according to a first setting instruction, and determines a correction range in the detected image according to the detection center.
- 4. The image detection method according to claim 3, wherein the detection center corresponds to a first reference object in a detection environment, and the processor determines a warning range in the detection image according to a second setting instruction, Wherein, in the detected image, the warning range covers the first reference object, the second reference object and the third reference object.
- 5. The image detection method according to claim 4, wherein in the detected image, a distance between the first reference object and the second reference object is equal to a distance between the first reference object and the third reference object, and the first reference object, the second reference object, and the third reference object are arranged in a straight line.
- 6. The image detection method according to claim 5, wherein in the detected image, the correction range is smaller than the warning range, and the correction range covers the first reference object and does not cover the second reference object and the third reference object.
- 7. The image detection method according to claim 4, wherein the clipping range covers the warning range.
- 8. The image detection method according to claim 4, wherein the processor calculates a diameter of the warning range according to the width per pixel and the height per pixel, and calculates a clipping width and a clipping height of the clipping range according to the diameter.
- 9. The image detection method according to claim 4, wherein the processor determines whether the person image is within the warning range according to the person detection result, so as to output a security warning notification.
- 10. The image detection method according to claim 1, wherein the camera is disposed on a bridge crane and acquires the detection image in a top view.
- 11. An image detection system, comprising: A camera for obtaining the detected image, and The processor is coupled with the camera and used for calculating the width and the height of the field range corresponding to the detected image according to the horizontal field angle and the vertical field angle of the camera, Wherein the processor calculates a width per pixel and a height per pixel according to the number of width pixels and the number of height pixels of the detected image and the width and the height of the field of view range, and the processor determines a clipping range in the detected image according to the width per pixel and the height per pixel, The processor cuts the detection image according to the cutting range to generate a cut image, and inputs the cut image to the character detection model so that the character detection model outputs a character detection result.
- 12. The image detection system of claim 11, wherein the processor obtains an image scale and a diagonal angle of view of the detected image from the camera and calculates the horizontal angle of view and the vertical angle of view from the image scale and the diagonal angle of view.
- 13. The image detection system of claim 11, wherein the processor selects a detection center in the detected image according to a first set instruction, and determines a correction range in the detected image according to the detection center.
- 14. The image detection system of claim 13, wherein the detection center corresponds to a first reference object in a detection environment, and the processor determines a warning range in the detection image according to a second setting instruction, Wherein, in the detected image, the warning range covers the first reference object, the second reference object and the third reference object.
- 15. The image detection system of claim 14, wherein in the detected image, a distance between the first reference object and the second reference object is equal to a distance between the first reference object and the third reference object, and the first reference object, the second reference object, and the third reference object are aligned.
- 16. The image detection system of claim 15, wherein in the detected image, the correction range is less than the alert range, and the correction range covers the first reference object and does not cover the second reference object and the third reference object.
- 17. The image detection system of claim 14, wherein the clipping range covers the alert range.
- 18. The image detection system of claim 14, wherein the processor calculates a diameter of the alert range based on the per-pixel width and the per-pixel height, and calculates a clipping width and a clipping height of the clipping range based on the diameter.
- 19. The image detection system according to claim 14, wherein the processor determines whether the person image is within the warning range according to the person detection result, so as to output a security warning notification.
- 20. The image detection system of claim 11, wherein the camera is disposed on a bridge crane and obtains the detection image in a top view.
Description
Image detection method and image detection system Technical Field The present invention relates to a detection method, and more particularly, to an image detection method and an image detection system. Background In the conventional look-down angle camera, the range of the actual scene corresponding to the captured image of the camera is dynamically changed along with the height of the camera, so that the ratio of the target image to the whole image in the captured image of the camera is also dynamically changed along with the height of the camera. As such, the conventional recognition model of the top view camera generally cannot perform effective image recognition on the images generated at the setting positions applied to different heights. Disclosure of Invention The invention provides an image detection method and an image detection system, which can realize an effective image detection function. The image detection method comprises the steps of obtaining a detection image through a camera, calculating the width and the height of a view field range corresponding to the detection image through a processor according to the horizontal view field angle and the vertical view field angle of the camera, calculating the width and the height of each pixel through the processor according to the number of pixels of the width and the number of pixels of the height of the detection image and the width and the height of the view field range, determining a cutting range in the detection image through the processor according to the width and the height of each pixel, cutting the detection image through the processor according to the cutting range to generate a cutting image, and inputting the cutting image into a person detection model through the processor so that the person detection model outputs person detection results. The image detection system of the invention comprises a camera and a processor. The camera is used for obtaining the detection image. The processor is coupled to the camera and is used for calculating the width and the height of the field range corresponding to the detected image according to the horizontal field angle and the vertical field angle of the camera. The processor calculates the width and height of each pixel according to the number of pixels and the height of the detected image and the width and height of the field of view. The processor determines a clipping range in the detected image according to the width of each pixel and the height of each pixel. The processor cuts the detection image according to the cutting range to generate a cut image. The processor inputs the cropped image to the character detection model so that the character detection model outputs a character detection result. Based on the above, the image detection method and the image detection system of the invention can effectively cut the image size suitable for the analysis of the character detection model, so that the character detection model can output accurate character detection results. In order to make the above features and advantages of the present invention more comprehensible, embodiments accompanied with figures are described in detail below. Drawings FIG. 1 is a block diagram of an image detection system according to an embodiment of the invention. Fig. 2 is a flowchart of an image detection method according to an embodiment of the invention. FIG. 3 is a schematic diagram of a detected image according to an embodiment of the invention. FIG. 4 is a schematic diagram of a detected image marked with a clipping range according to an embodiment of the present invention. FIG. 5 is a schematic diagram of a cropped image according to an embodiment of the invention. Wherein the symbols in the drawings are briefly described as follows: 100, an image detection system; 110 is a processor, 120 is a storage device, 121 is a person detection model, 130 is a camera, 300 is a detected image, 310 is a cutting range, 500 is a cut image, C1 is a correction range, C2 is a warning range, P0 is a first reference object, P1 is a second reference object, P2 is a third reference object, H1 and H2 are high pixel numbers, W1 and W2 are width pixel numbers, and S210-S260 are steps. Detailed Description In order that the invention may be more readily understood, the following specific examples are provided as illustrations of the true practice of the invention. In addition, wherever possible, the same reference numbers will be used throughout the drawings and the description to refer to the same or like parts. FIG. 1 is a block diagram of an image detection system according to an embodiment of the invention. Referring to fig. 1, an image detection system 100 includes a processor 110, a storage device 120, and a camera 130. The processor 110 is coupled to the storage device 120 and the camera 130. The storage device 120 is used for storing the person detection model 121. The person detection model 121 is an artificial intelligence m