An image recognition-based detection method and system

By using an image recognition-based detection method, combined with mobile terminals and panoramic image acquisition devices, along with Bluetooth positioning and GPS calibration, the problems of low efficiency in traditional manual counting and high cost of fixed cameras are solved, achieving efficient and accurate pig farm management with low-cost hardware configuration.

CN114399680BActive Publication Date: 2026-01-06CHENGDU RUIZHU ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210042235.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-14
Publication Date
2026-01-06
Estimated Expiration
2042-01-14

AI Technical Summary

Technical Problem

Traditional manual counting of pigs is inefficient and inaccurate, while fixed cameras are costly to install and also have low counting accuracy.

Method used

An image recognition-based detection method is adopted, which acquires image information through a mobile terminal and a panoramic image acquisition device, and combines Bluetooth positioning and GPS calibration to form computational data to improve accuracy.

Benefits of technology

By reducing hardware configuration costs and improving management capabilities, the accuracy and efficiency of pig farm management have been improved, while reducing labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399680B_ABST
    Figure CN114399680B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of monitoring management technical field, specifically to a kind of detection method and system based on image recognition. One of the detection method based on image recognition, including, in the state of obtaining first image information, obtain the second image information matched with the first image information;In the state that the first image information matches the second image information, according to the first image information forms a calculation data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of monitoring and management technology, specifically to a detection method and system based on image recognition. Background Technology

[0002] With economic development, people's demand for pork is increasing, and pork production is also increasing. Currently, the most common farming model is large-scale pig farming, which has realized the transformation of the pig farming industry from a scattered farming model to a large-scale and intensive model. The characteristics of this farming model are high pig density and large number of pigs. Its advantages are saving land, increasing the number of pigs per unit, being suitable for intensive farming, and facilitating statistics.

[0003] Traditional methods involve manually counting pigs, which is labor-intensive, inefficient, and prone to errors, resulting in low accuracy. With the introduction of modern equipment into the livestock industry, current technology uses fixed cameras for counting. However, this requires significant construction modifications to the pig farm, leading to higher hardware costs. Furthermore, pigs, being living animals, can easily hide in blind spots, resulting in low counting accuracy. Summary of the Invention

[0004] To address the aforementioned shortcomings, this invention provides a detection method, system, computer-readable storage medium, and electronic device based on image recognition, specifically:

[0005] On the one hand, this application provides a detection method based on image recognition, wherein: it includes,

[0006] While the first image information has been obtained, second image information that matches the first image information is obtained;

[0007] When the first image information matches the second image information, a calculation data is formed based on the first image information.

[0008] Preferably, in the above-described image recognition-based detection method, acquiring second image information matching the first image information after acquiring the first image information specifically includes:

[0009] In the state of having acquired the first image information, activate the second type of image data that matches the basic parameters according to the basic parameters of the first image information;

[0010] Based on the basic parameters, image information matching the basic parameters is queried in the second type of image data to form the second image information.

[0011] Preferably, in the above-described image recognition-based detection method, before acquiring second image information matching the first image information after acquiring the first image information, the method further includes:

[0012] Currently in the predetermined shooting mode, a first type of basic image is formed based on the shooting instructions input from the outside;

[0013] The first image information is formed based on the first type of basic image.

[0014] Preferably, in the above-described image recognition-based detection method, before acquiring second image information matching the first image information after acquiring the first image information, the method further includes:

[0015] Get the current first distance data;

[0016] If the first distance data matches the previous distance data, delete the historical shooting data in the current shooting mode and save the current shooting data; or if the first distance data does not match the previous distance data, save the current shooting data.

[0017] The first image information is formed based on the current shooting data.

[0018] On the other hand, this application further provides an image recognition-based detection system, wherein: it includes,

[0019] The first acquisition unit is used to acquire and form the first image information;

[0020] The second acquisition unit is used to acquire and form the second type of image information;

[0021] The matching unit, in the state of having obtained the first image information, obtains second image information that matches the first image information from the second type of image information;

[0022] The calculation unit, when the first image information matches the second image information, forms calculation data based on the first image information.

[0023] Preferably, in the above-described image recognition-based detection system, the matching unit specifically includes:

[0024] In the state of having acquired the first image information, activate the second type of image data that matches the basic parameters according to the basic parameters of the first image information;

[0025] Based on the basic parameters, image information matching the basic parameters is queried in the second type of image data to form the second image information.

[0026] Preferably, in the above-described image recognition-based detection system, the first acquisition unit is used to form a first type of basic image based on an externally input shooting command when the system is currently in a predetermined shooting mode; and to form the first image information based on the first type of basic image.

[0027] Preferably, the above-described image recognition-based detection system further includes:

[0028] The calculation unit is used to obtain the current first distance data;

[0029] The first acquisition unit is used to delete historical shooting data in the current shooting mode and save the current shooting data when the first distance data matches the previous distance data, or to save the current shooting data when the first distance data does not match the previous distance data; and to form the first image information based on the current shooting data.

[0030] On the other hand, this application further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements an image recognition-based detection method as described in any of the preceding claims.

[0031] Finally, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement an image recognition-based detection method as described in any of the preceding claims.

[0032] Compared with the prior art, the beneficial effects of this application are as follows:

[0033] Only a panoramic data acquisition device needs to be installed in the pig farm environment, reducing hardware costs. A corresponding mobile app is installed on the user's handheld device, allowing them to acquire image data and perform calculations based on it. Simultaneously, the panoramic information can be used to track the movement of inspection personnel and verify the authenticity of acquired images, thus improving the pig farm's management capabilities. Attached Figure Description

[0034] Figure 1 A schematic flowchart of an image recognition-based detection method provided in an embodiment of this application;

[0035] Figure 2 A schematic flowchart of an image recognition-based detection method provided in an embodiment of this application;

[0036] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0037] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0038] Example 1

[0039] An image recognition-based detection method is disclosed, which can be applied to either the server-side or the client-side, without limitation. To execute this method, at least a first acquisition device and a second acquisition device are included. Both are connected to the server. The first acquisition device can be a mobile terminal, such as a handheld device worn by a manager, equipped with or having an application installed to acquire first image information. The second acquisition device is used to acquire a panoramic image of the pigpen. Multiple second acquisition devices can be installed, depending on the actual situation; only the panoramic image of the pigpen is required for the second acquisition device. Both the first and second acquisition devices are connected to the server, specifically including…

[0040] Step S110: While the first image information has been obtained, acquire second image information that matches the first image information; wherein,

[0041] A pig farm may contain several enclosures. The first image information records the situation of pigs in each enclosure, and each enclosure has a corresponding first image information.

[0042] The second image information is a status image of the first image information formed by the manager holding the first acquisition device. The second image information can be a video stream or a single image.

[0043] It should be noted that the first image information can be determined during the shooting process. For example, an image is taken of a fence, and the corresponding first image information is formed based on the captured image. Alternatively, it can be formed through full-process image segmentation. The full-process image and the panoramic camera are linked to obtain the fence position in the full-process image. The panoramic image is divided into several fence positions based on the fence positions, and the first image information is formed based on each fence position image.

[0044] Indicatively:

[0045] The entire image can be formed by a camera with LiDAR, such as the camera system of the iPhone 13. The field image is formed by performing 3D modeling and segmentation on the entire image.

[0046] The entire image can also be formed using a mobile terminal's camera. By continuously changing the shooting area of ​​the mobile terminal, a full-range image of the current space can be formed (which can also be understood as a panoramic image acquired through the camera). By performing line detection and intersection detection on the entire image, the fence edges are segmented to form each fence area and the image information within that fence area. Typically, a fence consists of four railings or three railings and a wall. In the image, the railing information and the intersection information between railings or the wall can be obtained based on line detection and intersection detection using four straight lines (railings) at the ends of the fence and four intersections between them (forming between railings) or three straight lines (railings) and four intersections (including the intersection of railings and the wall). This allows for image segmentation.

[0047] Step S120: Under the state where the first image information matches the second image information, a calculation data is formed based on the first image information.

[0048] If the first image information matches the second image information, the first image information is determined to be true. The calculated data is then generated based on the first image information. If the first image information does not match the second image information, the first image information is determined to be false. No calculation is performed based on the first image information, and a notification message is returned.

[0049] In this application, only a data acquisition device capable of obtaining panoramic information needs to be installed in the pig farm environment, reducing hardware configuration costs. Simultaneously, the corresponding APP application is installed on the user's handheld mobile terminal. Users can acquire relevant image data through the handheld APP and calculate computational data based on this image data. Furthermore, the panoramic information can be used to track the movement of inspection personnel and verify the authenticity of the acquired images, thereby improving the pig farm's management capabilities.

[0050] Example 2

[0051] As a further preferred embodiment, the above-mentioned image recognition-based detection method further includes a corresponding calibration operation before acquiring second image information matching the first image information in step S110, where the first image information has been acquired. Specifically:

[0052] like Figure 1As shown, in step S10911, while currently in a predetermined shooting mode, a first type of basic image is formed based on an externally input shooting command; wherein, the predetermined shooting mode is a shooting mode in which the APP application is activated and the user controls the APP application. When the user enters a predetermined area (the predetermined area can be a spatial area preset by the server), the APP application can be in a pending activation state. For example, when the user is outside the predetermined area, and the APP application receives an externally input activation command, the server obtains a panoramic image matching the area where the APP application is located based on the confirmation activation command sent by the APP application. If the user is not recorded in the current panoramic image, the server sends a "reject" activation control command to the APP application; if the user is recorded in the current panoramic image, the server sends an "allow" activation control command to the APP application.

[0053] When the app is activated (meaning it's opened and its pages are displayed), GPS positioning calibration is performed based on the target area selected by the user. For example, if the user selects "First Farm" (the geographical location set during initial registration or use of the app), and the mobile device's GPS determines that the user is actually standing at "Second Farm," then the app cannot function in shooting mode. In this state, the app is activated but cannot enter the designated shooting mode.

[0054] It should be noted that the first type of basic image can be formed from a single image or from multiple images. For example, if the current app is in shooting mode, and the user is standing on the first fence, the user may take one photo of the first fence, or the user may take multiple photos of the first fence. The first type of basic image matching the first fence is formed based on one or more photos. As another example, when the first image information is formed using full-process image segmentation, the panoramic image may be formed from one image or multiple images.

[0055] In the actual calculation process, each fence is configured with first-class image information.

[0056] Step S10912: Form the first image information based on the first type of basic image. The first type of basic image is processed to form the first image information. For example, when the first type of basic image is a single photograph, the first image information is formed based on that photograph. When the first type of image information consists of multiple photographs, the feature images in the multiple photographs are first compared. If the feature images in the multiple photographs are the same, only one photograph is retained. If the feature images in the multiple photographs are all different, all photographs are retained, and the first image information is formed based on the multiple photographs.

[0057] Step S1101: In the state of obtaining the first image information, activate the second type of image data that matches the basic parameters according to the basic parameters of the first image information;

[0058] The basic parameter is the time data information recorded in the first image information. Based on the time data information, the second type of image data matching the time data information in the pig farm is read. The second type of image data can be video stream image information within the time data information range in the environment where the pig farm is located.

[0059] Step S1102: Based on the basic parameters, query the image information that matches the basic parameters in the second type of image data to form the second image information.

[0060] Step S1201: When the first image information matches the second image information, a calculation data is formed based on the first image information. That is, the server matches the video and / or image captured by the user within the field with the video stream in the panoramic image. When the video and / or image captured by the user within the field matches the video stream in the panoramic image, the first image information can be determined to be true; otherwise, the first image information is determined to be false.

[0061] To further improve the accuracy of the first image information, it can also be matched with the user's trajectory. For example, the user's journey to obtain the first image information can be recorded, and a shooting trajectory can be formed based on the journey. The video and / or image captured by the user in the field can be matched with the video stream and shooting trajectory in the panoramic image, and the authenticity of the first image can be determined based on the matching result.

[0062] In the above embodiments, a comparative analysis is performed based on the first image information, the panoramic image, and / or the trajectory. The authenticity of the first image is verified based on the analysis results, which aims to further improve the accuracy of the calculation.

[0063] Example 3

[0064] This embodiment provides another detection method based on image recognition, which is combined with Bluetooth equidistant transmission. Specifically, the APP application is in an active state and the Bluetooth function of the first acquisition device (or mobile terminal) is enabled, while the corresponding Bluetooth function is enabled in the second acquisition device.

[0065] Step S10921: Obtain the current first distance data; where the first distance is the distance between the first acquisition device and the second acquisition device. Before obtaining the first distance data, calibration processing is also required, specifically:

[0066] When a user enters a designated area, the app can be in a pending activation state. For example, if the user is outside the designated area and the app receives an activation command from an external source, the server retrieves a panoramic image matching the app's location based on the activation confirmation sent by the app. If the user is not recorded in the current panoramic image, the server sends a "deny" activation control command to the app. If the user is recorded in the current panoramic image, the server sends a "allow" activation control command to the app.

[0067] When the app is activated, it performs GPS positioning calibration based on the target area selected by the user. For example, if the user selects "Farm 1" in the app, but the mobile device's GPS determines that the user is actually standing in "Farm 2," then the app will not be able to access the current distance data for "Farm 2."

[0068] Step S10922: If the first distance data matches the previous distance data, delete the historical shooting data in the current shooting mode and save the current shooting data; or if the first distance data does not match the previous distance data, save the current shooting data; specifically:

[0069] If the first distance data matches the previous distance data, it is determined that the user's current position has not changed (it should be noted that "not changed" means that the calculation result has not changed, that is, it has not changed relatively. When the user's displacement distance is within the accuracy of Bluetooth positioning, it is considered that the current position has not changed). The historical shooting data in the current shooting mode is deleted, and the current shooting data is saved. This can be understood as the user's shooting target is the same object, so the saved historical shooting images are deleted to reduce memory.

[0070] If the first distance data does not match the previous distance data, the current shooting data is saved. This can be understood as the user's position changing, which in turn changes the shooting target, and therefore the captured image is retained.

[0071] Step S10923: Form the first image information based on the current shooting data. That is, form the first image information based on the retained image.

[0072] It should be noted that the first type of basic image can be formed from a single image or from multiple images or videos. For example, if the app is currently in shooting mode, and the user is standing on the first fence, the user may take one photo of the first fence, or the user may take multiple photos of the first fence. The first type of basic image matching the first fence is formed based on one photo and / or multiple photos and / or videos.

[0073] Step S210: While the first image information has been obtained, acquire the second image information that matches the first image information;

[0074] Step S320: Under the state where the first image information matches the second image information, a calculation data is formed based on the first image information.

[0075] In this embodiment, the authenticity of an image is determined by Bluetooth positioning. Embodiment 1 and Embodiment 2 can be implemented together or separately; no specific limitations are imposed here.

[0076] Example 4

[0077] Furthermore, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements a detection method based on image recognition as described in any of the preceding claims, specifically:

[0078] While the first image information has been obtained, second image information that matches the first image information is obtained;

[0079] When the first image information matches the second image information, a calculation data is formed based on the first image information.

[0080] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a computer system in which a program is executed, or it may reside in a different second computer system connected to the computer system via a network (such as the Internet). The second computer system can provide program instructions to the computer for execution. The term “storage medium” can include two or more storage media that may reside in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) that can be executed by one or more processors.

[0081] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the VR device image processing described above, but can also perform related operations in the image processing methods provided in any embodiment of this application.

[0082] Example 5

[0083] This application provides an electronic device. Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of this application. Figure 3 As shown, this embodiment provides an electronic device 400, which includes: one or more processors 420; and a storage device 410 for storing one or more programs, which, when executed by the one or more processors 420, cause the one or more processors 420 to perform:

[0084] While the first image information has been obtained, second image information that matches the first image information is obtained;

[0085] When the first image information matches the second image information, a calculation data is formed based on the first image information.

[0086] like Figure 3 As shown, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device can be one or more. Figure 3 Taking a processor 420 as an example; the processor 420, storage device 410, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 3 For example, China and Israel are connected via bus 450.

[0087] Storage device 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as program instructions corresponding to the image processing method in the embodiments of this application.

[0088] Storage device 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, storage device 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, storage device 410 may further include memory remotely located relative to processor 420, which can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0089] Input device 430 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 440 may include devices such as a display screen and a speaker.

[0090] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. An image recognition based detection method, characterized in that: At least comprising a first acquisition device and a second acquisition device, the first acquisition device and the second acquisition device are connected with a server end, the first acquisition device formed by a mobile terminal acquires first image information, and the second acquisition device is used for acquiring a panoramic image or a video stream of a pigsty; Wherein, one pig farm contains a plurality of enclosures, each of which is configured with a corresponding first image information, the first image information is used to record the pig condition in each enclosure, and the detection method comprises, In the state of obtaining the first image information, the second image information matched with the first image information is obtained from the panoramic image or the video stream acquired by the second acquisition device, the second image information is a state recording image or video in the process of forming the first image information, and specifically comprises: In the state of obtaining the first image information, the second image information matched with the first image information is obtained from the panoramic image or the video stream acquired by the second acquisition device, the second image information is a state recording image or video in the process of forming the first image information, and specifically comprises: According to the basis parameter, the image information matched with the basis parameter is queried in the second image data to form the second image information; The server end performs matching operation on the first image information and the second image information, in the state that the first image information matches the second image information, it is determined that the first image information is a real acquisition image, and a calculation data is formed according to the first image information, if it is not matched, the image recognition calculation is not performed.

2. The image recognition-based detection method of claim 1, wherein, In the state of obtaining the first image information, before obtaining the second image information matched with the first image information, it further comprises: In the current predetermined shooting mode, a first type of basic image is formed according to an external input shooting instruction; The first image information is formed according to the first type of basic image.

3. The image recognition-based detection method of claim 1, wherein, In the state of obtaining the first image information, before obtaining the second image information matched with the first image information, it further comprises: Obtain the current first distance data; In the state that the first distance data matches the last distance data, delete the historical shooting data in the current shooting mode, save the current shooting data, or in the state that the first distance data does not match the last distance data, save the current shooting data; The first image information is formed according to the current shooting data.

4. An image recognition based detection system, characterized in that: Comprise, The first acquisition unit is used for obtaining and forming first image information by a mobile terminal, wherein one pig farm contains a plurality of enclosures, each of which is configured with a first image information, and the first image information is used to record the pig condition in the corresponding enclosure; The second acquisition unit is used for acquiring a panoramic image or a video stream of a pigsty and forming a second type of image information; The matching unit obtains the second image information matched with the first image information in the second type of image information in the state of obtaining the first image information, the second image information is a state image or video recorded in the process of forming the first image information, and specifically comprises: In a state of obtaining the first image information, activating second type image data matched with a basic parameter of the first image information according to the basic parameter, wherein the basic parameter is time data information recorded in the first image information, and the second type image data is video stream image information in a range of the time data information in an environment where the pig farm is located; querying image information matched with the basic parameter in the second type image data according to the basic parameter to form the second image information; a calculation unit performing matching operation on the first image information and the second image information at a server end, determining that the first image information is a real collected image in a state of matching the first image information with the second image information, and forming a calculation data according to the first image information, and not performing image recognition calculation if not matching.

5. The image recognition-based detection system of claim 4, wherein, The matching unit specifically comprises: In a state of obtaining the first image information, activating second type image data matched with a basic parameter of the first image information according to the basic parameter; querying image information matched with the basic parameter in the second type image data according to the basic parameter to form the second image information.

6. The detection system based on image recognition according to claim 4, characterized in that: the first collecting unit is used to form first type basic image according to an externally input shooting instruction in a state of currently being in a predetermined shooting mode, and form the first image information according to the first type basic image.

7. The image recognition based detection system of claim 4, wherein, Further comprising: the calculation unit is used to obtain current first distance data; the first collecting unit is used to delete historical shooting data in the current shooting mode in a state of the first distance data matching previous distance data, save current shooting data, or save current shooting data in a state of the first distance data not matching the previous distance data, and form the first image information according to the current shooting data.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the detection method based on image recognition according to any one of claims 1-3.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the detection method based on image recognition according to any one of claims 1-3.

Citation Information

Patent Citations

  • Living body detection method and device, electronic equipment and storage medium

    CN110503023A

  • Intelligent silkworm larva counting method and application thereof

    CN112308028A