CN112770047A - Control method and control device for image real-time storage and electronic equipment - Google Patents

Control method and control device for image real-time storage and electronic equipment Download PDF

Info

Publication number
CN112770047A
CN112770047A CN202011587987.3A CN202011587987A CN112770047A CN 112770047 A CN112770047 A CN 112770047A CN 202011587987 A CN202011587987 A CN 202011587987A CN 112770047 A CN112770047 A CN 112770047A
Authority
CN
China
Prior art keywords
image
judgment result
camera
validity judgment
validity
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011587987.3A
Other languages
Chinese (zh)
Other versions
CN112770047B (en
Inventor
常同辉
沈智慧
辛安民
王川艳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikrobot Co Ltd
Original Assignee
Hangzhou Hikrobot Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN202011587987.3A priority Critical patent/CN112770047B/en
Publication of CN112770047A publication Critical patent/CN112770047A/en
Application granted granted Critical
Publication of CN112770047B publication Critical patent/CN112770047B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/61Control of cameras or camera modules based on recognised objects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Studio Devices (AREA)

Abstract

The invention discloses a control method and a control device for image real-time storage and electronic equipment. Based on the method and the device, the validity judgment result of the collected image of the first camera can be obtained, and the enqueued image increment of the image cache queue when the validity judgment result is invalid can be smaller than the enqueued image increment when the validity judgment result is valid by adjusting the cache strategy, so that the storage of the collected image containing the target object can be preferentially ensured by using the image cache queue, and the storage pressure is released by appropriately abandoning the collected image not containing the target object. Therefore, the method can support the collection frame rate of the first camera to be unlimited at least when the collected image contains the target object, does not need to adopt a high-performance storage medium which causes cost improvement, and can avoid frame loss of the collected image containing the target object so as to reduce the probability of effective image information loss.

Description

Control method and control device for image real-time storage and electronic equipment
Technical Field
The present invention relates to image storage technologies, and in particular, to a control method for storing images in real time, a control device for storing images, and an electronic device.
Background
With the development of camera technology, the acquisition frame rate of the image output and acquired by the camera is greatly improved, so that the camera can meet the requirements of image continuity and high image quality, and can be better applied to the fields of machine vision, physical volume measurement, product defect detection and the like.
The captured images output by the camera often need to be stored in a storage medium of the high speed camera, or other device, so that the stored images can be subsequently retrieved from memory for identification or monitoring.
However, the storage frame rate that the storage medium can support is often lower than the acquisition frame rate of the camera, so:
due to the frame rate difference of the storage frame rate compared with the acquisition frame rate, the storage frame loss of the acquired image is easily caused, so that the effective image information is lost;
if the sampling frame rate of the camera is adjusted down to avoid frame loss in storage, the acquisition frame rate of the camera is limited by the storage frame rate which can be supported by the storage medium;
if a high-performance storage medium supporting a high storage frame rate is used in order to avoid storage of a frame loss, an increase in cost is inevitable.
Therefore, how to reduce the probability of frame loss during storage while considering that the acquisition frame rate of the camera is not limited and the cost of the storage medium is not increased becomes a problem to be solved in the prior art.
Disclosure of Invention
In view of this, embodiments of the present invention provide a control method for storing images in real time, a control device for storing images, and an electronic device, which are helpful to reduce the probability of losing effective image information while keeping the acquisition frame rate of a camera from being limited and the cost of a storage medium from being increased.
In one embodiment, a control method for real-time storage of images may include:
receiving a captured image output by an image sensor of a first camera;
obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, the collected image contains a target object, and if the validity judgment result is invalid, the collected image does not contain the target object;
and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of the specified storage medium, so that the enqueueing image increment of the image caching queue when the validity judgment result is invalid is less than the enqueueing image increment when the validity judgment result is valid.
Optionally, obtaining a validity determination result for the received captured image includes: acquiring a synchronous image of a received collected image, wherein the pixel specification of the synchronous image is smaller than that of the collected image, and the synchronous image at least comprises a designated area of the collected image, and the designated area is an area where a target object appears in the collected image; carrying out image recognition on the synchronous image; and obtaining a validity judgment result of the acquired image according to the image identification result, wherein if the image identification result shows that the target object is successfully identified, the validity judgment result is valid, and otherwise, the validity judgment result is invalid.
Optionally, acquiring a synchronization image of the received captured image includes: and intercepting a synchronous image containing the image content of the designated area from the acquired image.
Optionally, acquiring a synchronization image of the received captured image includes: and obtaining a synchronous image which is output synchronously with the acquired image from the second camera, wherein the overlapping part of the visual field range of the second camera and the visual field range of the first camera is used for imaging to obtain the image content of the designated area.
Optionally, obtaining a validity determination result of the received collected image, which is triggered frame by frame; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising: if the validity judgment result is valid, sending the received collected image into an image cache queue; and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
Optionally, obtaining a validity determination result of the received collected image, and periodically triggering according to a preset sampling rate; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising: if the validity judgment result is valid, allowing the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue; and if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in the image cache queue.
Optionally, obtaining a validity determination result of the received collected image, and periodically triggering according to a preset sampling rate; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising: if the validity judgment result is valid, setting the acquisition frame rate of the image sensor as a first frame rate; if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate; the second frame rate is greater than 0 and less than or equal to the first frame rate.
In another embodiment, a control apparatus for real-time storage of images may include:
the image acquisition module is used for receiving a collected image output by an image sensor of the first camera;
the judging and detecting module is used for obtaining the effectiveness judging result of the received collected image, wherein if the effectiveness judging result is effective, the collected image is indicated to contain the target object, and if the effectiveness judging result is invalid, the collected image is indicated to not contain the target object;
and the buffer adjustment module is used for determining a buffer strategy of an image buffer queue for transferring the acquired image to the image storage module according to the validity judgment result, so that the enqueue image increment of the image buffer queue when the validity judgment result is invalid is less than the enqueue image increment when the validity judgment result is valid.
In another embodiment, a control system for real-time storage of images, comprises: the device comprises a conveyor belt, a first camera and a computer, wherein the conveyor belt is used for conveying a target object; the acquisition area of the first camera covers the conveying path of the conveying belt and is used for acquiring images when the conveying belt conveys the target object; obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, the collected image contains a target object, and if the validity judgment result is invalid, the collected image does not contain the target object; determining a caching strategy for transferring the collected image to an image caching queue of a specified storage medium according to the validity judgment result, so that the enqueueing image increment of the image caching queue when the validity judgment result is invalid is less than the enqueueing image increment when the validity judgment result is valid; and the computer is used for receiving the collected image output by the first camera from the first camera and storing the collected image in a specified storage medium.
In another embodiment, an electronic device includes a processor for executing the above-described control method;
optionally, the electronic device is a first camera including an image sensor, and the specified storage medium is located in the first camera, or in a computer in signal connection with the first camera, or in a storage device in signal connection with the computer; alternatively, the first and second electrodes may be,
the electronic device is a computer in signal connection with the first camera, and the specified storage medium is located in the computer or in a storage device in signal connection with the computer.
In another embodiment, an electronic device includes a processor for executing the control method according to the previous embodiment.
Optionally, the electronic device is a first camera including an image sensor, and the specified storage medium is located in the first camera, or in a computer in signal connection with the first camera, or in a storage device in signal connection with the computer.
Alternatively, the electronic device is a computer in signal connection with the first camera, and the specified storage medium is located in the computer or in a storage device in signal connection with the computer.
As can be seen from the above, based on the above embodiment, the validity determination result of the captured image of the first camera can be obtained, and by adjusting the caching policy, the enqueued image increment of the image caching queue when the validity determination result is invalid can be made smaller than the enqueued image increment when the validity determination result is valid, so that the captured image including the target object can be preferentially guaranteed to be stored by using the image caching queue, and the storage pressure can be released by appropriately discarding the captured image not including the target object. Therefore, the method can support the collection frame rate of the first camera to be unlimited at least when the collected image contains the target object, does not need to adopt a high-performance storage medium which causes cost improvement, and can avoid frame loss of the collected image containing the target object so as to reduce the probability of effective image information loss.
Drawings
FIG. 1 is a flow chart of a control method for real-time storage of images according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a first optimization flow of the control method shown in FIG. 1;
FIG. 3 is a schematic diagram illustrating a second optimization flow of the control method shown in FIG. 1;
FIG. 4 is a schematic flow chart of a third optimization of the control method shown in FIG. 1;
FIG. 5 is a schematic diagram illustrating a fourth optimization flow of the control method shown in FIG. 1;
FIG. 6 is a schematic diagram illustrating a fifth optimization flow of the control method shown in FIG. 1;
FIG. 7 is a sixth optimization flow chart of the control method shown in FIG. 1;
FIG. 8 is a schematic diagram illustrating a seventh optimization flow of the control method shown in FIG. 1;
FIG. 9 is a schematic view of an eighth optimization flow of the control method shown in FIG. 1;
FIGS. 10a and 10b are expanded flowcharts of the control method shown in FIG. 1 during off-site storage;
FIG. 11 is a schematic diagram of an exemplary structure of a control device for real-time image storage according to another embodiment of the present invention;
FIG. 12 is a schematic diagram of an exemplary configuration of a control system for real-time storage of images in accordance with another embodiment of the present invention;
fig. 13a and 13b are schematic diagrams of exemplary structures of an electronic device in a further embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples.
In an embodiment of the present invention, a camera, such as an industrial camera, mainly used for capturing an image of a target object is referred to as a first camera, and an image sensor of the first camera may output a captured image connection through an interface of a camera connection (Cameralink) protocol, or other data bus interface, or a wireless transmission interface.
In the embodiment of the present invention, the specified storage medium for storing the captured image may be a mechanical hard disk (HDD), a Solid State Disk (SSD), or the like, and the specified storage medium may be disposed in the first camera, or in a computer signal-connected to the first camera, or in a storage device signal-connected to the computer.
In particular, embodiments of the present invention add an image buffer queue (e.g., disposed in or separate from a designated storage medium) between the image sensor of the first camera and the designated storage medium for offloading the captured image to the designated storage medium. Moreover, the embodiment of the invention also adds an effectiveness judgment mechanism for the collected image and a cache strategy regulation mechanism combined with the effectiveness judgment mechanism, wherein:
the validity judging mechanism is used for judging whether a collected image received from the image sensor of the first camera contains a target object or not;
by adjusting the caching strategy, the enqueued image increment of the image caching queue when the validity judgment result is invalid is smaller than the enqueued image increment when the validity judgment result is valid, so that the storage of the acquired image containing the target object can be preferentially ensured by using the image caching queue, and the storage pressure is released by appropriately discarding the acquired image not containing the target object.
Therefore, the method can support the collection frame rate of the first camera to be unlimited at least when the collected image contains the target object, does not need to adopt a high-performance storage medium which causes cost improvement, and can avoid frame loss of the collected image containing the target object so as to reduce the probability of effective image information loss.
Fig. 1 is a flowchart of a control method for image real-time storage according to an embodiment of the present invention. Referring to fig. 1, in this embodiment, the control method for image real-time storage may include:
step 110, receiving a collected image output by an image sensor of a first camera;
step 120, obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, it indicates that the collected image contains the target object, and if the validity judgment result is invalid, it indicates that the collected image does not contain the target object;
and step 130, determining a caching strategy for transferring the collected image to an image caching queue of the specified storage medium according to the validity judgment result, so that the enqueue image increment of the image caching queue when the validity judgment result is invalid is less than the enqueue image increment when the validity judgment result is valid.
If the above-mentioned process is executed by the processor of the first camera, the image cache queue may be disposed in the first camera, and the specified storage medium may be disposed in the first camera (the image cache queue may be disposed in the specified storage medium or another storage medium independent of the specified storage medium at this time), or in a computer signal-connected to the first camera, or in a storage device signal-connected to the computer.
If the above-mentioned flow is executed by a processor of a computer connected to the first camera signal, the image cache queue may be disposed in the computer, and the specified storage medium may be disposed in the computer (the image cache queue may be disposed in the specified storage medium or another storage medium independent of the specified storage medium at this time), or in a storage device connected to the computer signal.
In this embodiment, different validity determination results are provided for step 120 in the above flow, and may be obtained by directly performing image recognition on the acquired image, or may be obtained by performing equivalent image recognition in a size chart manner, or may be obtained according to the sensing signal of the sensor. These acquisition modes will be described in detail one by one hereinafter.
In this embodiment, for the case that the validity determination result is obtained in step 120 by directly performing image recognition on the captured image, or the validity determination result is obtained in a large-small graph equivalent image recognition manner, the validity determination may be performed by executing step 120 on each captured image, or the validity determination performed in step 120 may be periodically triggered according to a preset sampling rate, that is, the validity determination is performed on the captured image every several frames, and the transmission of the captured image in the sampling period is managed according to the determination result.
Further optionally, step 130 in the above-mentioned flow may also implement the adjustment of the caching policy in different ways.
For example, in the case that each frame of captured image is subjected to validity determination by performing step 120, step 130 may adjust the caching policy by controlling image queuing, that is, if the validity determination result is valid, the received captured image is sent to the image caching queue; and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
For another example, if the validity determination result of the acquired received captured image is periodically triggered according to a preset sampling rate, then:
step 130 may adjust the caching policy by controlling the image queuing, that is, if the validity determination result is valid, allowing the collected image received from the image sensor before the next cycle time arrives to be stored in the image caching queue; if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue;
alternatively, step 130 may also select to adjust the caching policy by adjusting the image output amount of the image sensor of the first camera, that is, if the validity determination result is valid, the acquisition frame rate of the image sensor is set to the first frame rate; if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate; the second frame rate is greater than 0 and less than or equal to the first frame rate, and the second frame rate may be allowed to be equal to 0 for the case that the validity determination result is determined according to the sensing signal received from the set sensor in step 120.
Hereinafter, combinations of the above various modes will be described in detail.
Fig. 2 is a schematic diagram of a first optimization flow of the control method shown in fig. 1. Referring to fig. 2, taking an example that step 120 in the flow shown in fig. 1 adopts a validity judgment result in a manner of directly performing image recognition on the acquired image, and the obtained validity judgment result is triggered frame by frame, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 210, receiving a captured image output by an image sensor of a first camera.
And step 221, performing image recognition on the acquired image.
And step 222, obtaining a validity judgment result of the acquired image according to the image identification result of the acquired image, wherein if the image identification result shows that the target object is successfully identified, the validity judgment result is valid, and otherwise, the validity judgment result is invalid.
Step 230, according to the validity determination result, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, sending the received collected image into an image cache queue;
and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
By this point, the decision process for one frame of captured image is finished, and then the step 210 can be returned to execute the decision process for the next frame of captured image in a loop.
Fig. 3 is a schematic diagram of a second optimization flow of the control method shown in fig. 1. Referring to fig. 3, taking as an example that step 120 in the flowchart shown in fig. 1 acquires the validity determination result by directly performing image recognition on the acquired image, and the acquired validity determination result is periodically triggered according to a preset sampling rate, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 310, receiving a captured image output by an image sensor of a first camera.
Step 320, judging whether the current time is the period time for obtaining the validity judgment result, if so, skipping to step 321, otherwise, skipping to step 340.
And step 321, performing image recognition on the acquired image.
And 322, obtaining a validity judgment result of the acquired image according to the image identification result of the acquired image, wherein the validity judgment result is valid if the image identification result shows that the target object is successfully identified, and the validity judgment result is invalid if the image identification result shows that the target object is not successfully identified.
Step 330, determining a caching strategy for transferring the collected image to an image caching queue of the specified storage medium according to the validity determination result, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, allowing the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue;
and if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in the image cache queue.
And 340, according to the cache strategy determined at the previous period, performing operation matched with the cache strategy at the previous period on the currently acquired sampling image.
For example, step 330 may further set a status flag bit (e.g., a register bit) according to the obtained validity determination result, and the status flag bit (e.g., the register bit) may be queried each time step 340 is executed to determine the caching policy determined at the previous cycle time.
By this point, the decision process for one frame of captured image is finished, and then the step 310 can be returned to execute the decision process for the next frame of captured image in a loop. Specifically, in the method illustrated in fig. 3, after step 330 is executed, the process returns to step 310 to receive a next frame of captured image output by the image sensor of the first camera for decision process; after the step 340 is executed, the process returns to the step 310, and a next frame of captured image output by the image sensor of the first camera is received for the decision process.
Fig. 4 is a third flowchart illustrating the control method shown in fig. 1. Referring to fig. 4, taking as an example that step 120 in the flowchart shown in fig. 1 acquires the validity determination result by directly performing image recognition on the acquired image, and the acquired validity determination result is periodically triggered according to a preset sampling rate, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 410, receiving a captured image output by an image sensor of a first camera.
And step 420, judging whether the current time is the period time for obtaining the validity judgment result.
And step 421, when the current time is judged to be the period time for obtaining the validity judgment result, performing image recognition on the obtained collected image.
And 422, obtaining a validity judgment result of the acquired image according to the image identification result of the acquired image, wherein if the image identification result shows that the target object is successfully identified, the validity judgment result is valid, and otherwise, the validity judgment result is invalid.
Step 430, according to the validity determination result, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, setting the acquisition frame rate of the image sensor as a first frame rate;
if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate;
the second frame rate is greater than 0 and less than or equal to the first frame rate.
By this point, the decision process for acquiring an image for one frame is finished, and then the step 410 can be returned to execute the decision process for acquiring an image for the next frame in a loop, and the period interval of each loop changes with the change of the acquisition frame rate of the image sensor. Specifically, in the method shown in fig. 4, after step 430 is executed, the process returns to step 410, where the next frame of captured image output by the image sensor of the first camera is received for the decision process, and the period interval of each loop of the decision process varies with the change of the frame rate of capture of the image sensor.
Fig. 5 is a schematic diagram of a fourth optimization flow of the control method shown in fig. 1. Referring to fig. 5, taking as an example that step 120 in the flow shown in fig. 1 performs equivalent image recognition in a size chart manner to obtain a validity judgment result, and the obtained validity judgment result is triggered frame by frame, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 510, receiving a captured image output by an image sensor of a first camera.
Step 521, acquiring a synchronous image of the received collected image, wherein the pixel specification of the synchronous image is smaller than that of the collected image, and the synchronous image at least comprises a designated area of the collected image, and the designated area is an area where the target object appears in the collected image.
In this step, there are two ways to obtain the received synchronous image of the collected image, the first way is: intercepting a synchronous image containing image content of a designated area from an acquired image; the second way is: and obtaining a synchronous image which is output synchronously with the acquired image from the second camera, wherein the overlapping part of the visual field range of the second camera and the visual field range of the first camera is used for imaging to obtain the image content of the designated area.
In the second mode, the second camera is used, and the position of the second camera and the positional relationship with the first camera are set so that the second camera can obtain a synchronous image output in synchronization with the captured image. Specifically, the first case is: the lens optical axis of the second camera may coincide with the lens optical axis of the first camera and be arranged in the same direction so that the field of view of the second camera falls entirely within the field of view of the first camera or so that the field of view of the first camera falls entirely within the field of view of the second camera. The second case is: the lens optical axis of the second camera may also be offset from the lens optical axis of the first camera and arranged in the same direction so that the field of view of the second camera falls entirely within the field of view of the first camera or so that the field of view of the second camera overlaps partially with the field of view of the first camera. The third case is: the lens optical axis of the second camera may also intersect the lens optical axis of the first camera such that the field of view of the second camera falls entirely within the field of view of the first camera, or such that the field of view of the first camera falls entirely within the field of view of the second camera, or such that the field of view of the second camera overlaps partially with the field of view of the first camera.
It can be seen that, since the synchronous image captured by the second camera focuses on whether there is an object and may not focus on whether the object has an imaging resolution sufficient to be recognized, how to set the second camera may be arbitrarily set according to the spatial layout of the actual scene.
Step 522, image recognition is performed on the synchronous image.
Step 523, obtaining an effectiveness judgment result of the collected image according to the image recognition result of the synchronous image, where the effectiveness judgment result is valid if the image recognition result indicates that the target object is successfully recognized, and otherwise, the effectiveness judgment result is invalid.
Step 530, according to the validity determination result, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, sending the received collected image into an image cache queue;
and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
By this point, the decision process for one frame of captured image is finished, and then the step 510 can be returned to execute the decision process for the next frame of captured image in a loop.
Fig. 6 is a schematic diagram of a fifth optimization flow of the control method shown in fig. 1. Referring to fig. 6, taking as an example that step 120 in the flowchart shown in fig. 1 performs equivalent image recognition in a size chart manner to obtain a validity judgment result, and the obtained validity judgment result is periodically triggered according to a preset sampling rate, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 610, receiving a captured image output by an image sensor of a first camera.
And step 620, judging whether the current period time is the period time for obtaining the validity judgment result, if so, skipping to step 621, and if not, skipping to step 640.
Step 621, obtaining a synchronous image of the received captured image, where a pixel specification of the synchronous image is smaller than a pixel specification of the captured image, and the synchronous image at least includes a designated area of the captured image, where the designated area is an area where the target object appears in the captured image.
The process of acquiring the synchronous image in this step may be substantially the same as that of step 521 in the flowchart shown in fig. 5.
Step 622, image recognition is performed on the synchronous image.
And 623, obtaining an effectiveness judgment result of the acquired image according to the image identification result of the synchronous image, wherein if the image identification result shows that the target object is successfully identified, the effectiveness judgment result is effective, and otherwise, the effectiveness judgment result is invalid.
Step 630, according to the validity determination result, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, sending the received collected image into an image cache queue;
and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
And step 640, according to the cache policy determined at the previous period, performing an operation matched with the cache policy at the previous period on the currently acquired sample image.
For example, step 630 may further set a status flag bit (e.g., a register bit) according to the obtained validity determination result, and the status flag bit (e.g., the register bit) may be queried each time step 640 is performed to determine the caching policy determined at the previous cycle time.
By this point, the decision process for one frame of captured image is finished, and then the step 610 can be returned to execute the decision process for the next frame of captured image in a loop. Specifically, in the method shown in fig. 6, after step 630 is executed, the process returns to step 610, where a decision process is performed from the next frame of captured image output from the image sensor of the first camera; after step 640 is performed, the process returns to step 610, where the decision process is performed from the next frame of captured image output from the image sensor of the first camera.
Fig. 7 is a sixth optimization flow diagram of the control method shown in fig. 1. Referring to fig. 7, taking as an example that step 120 in the flowchart shown in fig. 1 performs equivalent image recognition in a size chart manner to obtain a validity judgment result, and the obtained validity judgment result is periodically triggered according to a preset sampling rate, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 710, receiving a collected image output by an image sensor of a first camera;
and 720, judging whether the current time is the period time for obtaining the validity judgment result.
Step 721, when it is determined that the current time is the period time for obtaining the validity determination result, obtaining a synchronization image of the received collected image, wherein the pixel specification of the synchronization image is smaller than that of the collected image, and the synchronization image at least includes a designated area of the collected image, where the designated area is an area where the target object appears in the collected image;
step 722, performing image recognition on the synchronous image;
and 723, obtaining an effectiveness judgment result of the acquired image according to an image identification result of the synchronous image, wherein if the image identification result shows that the target object is successfully identified, the effectiveness judgment result is effective, and otherwise, the effectiveness judgment result is invalid.
Step 730, according to the validity determination result, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, setting the acquisition frame rate of the image sensor as a first frame rate;
if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate;
the second frame rate is greater than 0 and less than or equal to the first frame rate.
Step 740, maintaining the current acquisition frame rate determined by the first camera at the previous period time.
By this point, the decision process for acquiring an image for one frame is finished, and then the step 710 may be returned to execute the decision process for acquiring an image for the next frame in a loop, and the period interval of each loop may vary with the variation of the acquisition frame rate of the image sensor. Specifically, in the method shown in fig. 7, after step 730 is executed, the process returns to step 710, where the next frame of captured image output by the image sensor of the first camera is received for the decision process, and the period interval of each loop of the decision process varies with the change of the frame rate of capture of the image sensor.
Fig. 8 is a seventh optimization flow diagram of the control method shown in fig. 1. Referring to fig. 8, taking as an example that step 120 in the flowchart shown in fig. 1 obtains the validity determination result according to the sensing signal of the sensor, and the obtained validity determination result is triggered frame by frame, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 810, receiving a captured image output by an image sensor of a first camera.
Step 821, detecting a signal state of an induction signal for inducing the target object;
and step 822, obtaining an effectiveness judgment result of the acquired image according to the detected signal state, wherein if the signal state indicates that the target object is induced, the effectiveness judgment result is effective, otherwise, the effectiveness judgment result is invalid.
Step 830, determining a caching policy for transferring the acquired image to an image caching queue of the specified storage medium according to the validity determination result, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, sending the received collected image into an image cache queue;
and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
By this point, the decision process for one frame of captured image is finished, and then the step 810 can be returned to execute the decision process for the next frame of captured image in a loop.
Fig. 9 is a schematic diagram of an eighth optimization flow of the control method shown in fig. 1. Referring to fig. 9, taking as an example that step 120 in the flowchart shown in fig. 1 obtains the validity determination result according to the sensing signal of the sensor, and the obtained validity determination result is triggered frame by frame, the control method for image real-time storage in this embodiment may be optimized to include the following steps:
step 910, receiving a collected image output by an image sensor of a first camera;
step 921, detecting a signal state of an induction signal for inducing the target object;
and 922, obtaining an effectiveness judgment result of the acquired image according to the detected signal state, wherein if the signal state indicates that the target object is induced, the effectiveness judgment result is effective, otherwise, the effectiveness judgment result is invalid.
Step 930, determining a caching strategy for transferring the collected image to an image caching queue of the specified storage medium according to the validity determination result, so that the enqueued image increment of the image caching queue when the validity determination result is invalid is less than the enqueued image increment when the validity determination result is valid, wherein:
if the validity judgment result is valid, setting the acquisition frame rate of the image sensor as a first frame rate;
if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate;
the second frame rate is greater than or equal to 0 and less than or equal to the first frame rate.
By this point, the decision process for acquiring an image for one frame is finished, and then the step 910 may be returned to execute the decision process for acquiring an image for the next frame in a loop, and the period interval of each loop may vary with the variation of the acquisition frame rate of the image sensor.
In the case of using the sensing signal in the flow shown in fig. 8 or fig. 9, the sensing signal may be generated by a sensor, which may be any sensing device capable of sensing the presence of the target object in the sensing range, such as a photoelectric switch. The sensing range of the sensor may be located upstream of the field of view of the image sensor in the transport path of the belt for transporting the target object.
At this time, there may be a positional shift between the sensing range of the sensor and the visual field range of the image sensor, and such a positional shift may cause a delay deviation to the validity decision. That is, when the sensing signal of the sensor indicates the presence of the object, the object may not have been conveyed by the conveyor belt to the field of view of the image sensor, and when the object may have been conveyed by the conveyor belt to the field of view of the image sensor, the object has left the sensing range of the sensor and thus the signal state of the sensing signal indicates the absence of the object.
Therefore, step 821 in the flow shown in fig. 8 and step 921 in the flow shown in fig. 9 can avoid the delay deviation resulting from the validity decision by compensating for the position deviation. For example, step 821 in the flow shown in fig. 8 and step 921 in the flow shown in fig. 9 may specifically include: and determining the signal state of the sensing signal synchronous with the acquired image acquired currently by using a preset delay time, wherein the delay time is determined according to the position offset between the sensing range of the sensor and the visual field range of the image sensor along the direction of the transmission belt and the transmission speed of the transmission belt.
As described above, regardless of whether the control method for real-time storage of images in this embodiment is executed by the processor of the first camera or by the processor of the computer in signal connection with the first camera, there may be a case where the image cache queue is deployed in the same device as the specified storage medium, or there may also be a case where the image cache queue is deployed off-site from the specified storage medium, that is, the image cache queue is deployed in another storage medium that is independent of the specified storage medium and belongs to a different device from the specified storage medium, respectively.
For the condition that the image cache queue and the specified storage medium are deployed in the same equipment, the collected images in the image cache queue can be stored in the specified storage medium according to the first-in first-out principle.
In the case where the image cache queue is deployed in a different place from the specified storage medium, this embodiment not only implements image enqueuing control for the image cache queue in the foregoing manner, but also implements image dequeuing control for image different-place transmission. Accordingly, for a specific storage medium, a dump buffer queue for image off-site transmission can be further provided.
Fig. 10a and 10b are expanded flowcharts of the control method shown in fig. 1 when the control method is stored in a different place.
Fig. 10a is a flow of image dequeuing control for image off-site transmission of an image buffer queue, please refer to fig. 10a, in which the control method for image real-time storage in this embodiment may further include the following flows executed in parallel with the flow shown in fig. 1:
step 1010, detecting whether a to-be-transmitted acquisition image cached in the image cache queue exists currently, and if so, executing step 1020; if not, returning to the step to continue the detection until a new collected image is stored in the image cache queue;
step 1020, according to the queuing sequence of the collected images stored in the image buffer queue, transmitting the collected images firstly stored in the image buffer queue to a specified storage medium;
step 1030, detecting whether the transmission is successful, if so, returning to step 1010 for detection; if not, return to step 1020 to initiate retransmission.
Preferably, a retransmission threshold may be set in advance for the number of times of initiating retransmission, and when the retransmission threshold is reached and still fails, the retransmission may not be continued, but the detection is directly returned to 1010.
Fig. 10b is a flow of image unloading control for image off-site transmission for the unloading buffer queue, please refer to fig. 10b, in this embodiment, the control method for image real-time storage may further include the following flows executed in parallel and in a different manner from the flows shown in fig. 1 and fig. 10 a:
step 1040, judging whether the dump cache queue has the acquired image obtained by transmission, if so, executing step 1050; if not, returning to the step to continue the detection until a new acquired image is stored in a dump cache queue;
and 1050, storing the acquired images firstly stored in the dump buffer queue in a specified storage medium according to the queuing sequence of the acquired images stored in the dump buffer queue.
In the process illustrated in fig. 10b, the remote entity provided with the specified storage medium may further set a dump cache queue, and before the acquired image enters the specified storage medium, the acquired image first enters the dump cache queue to be sequentially cached, and then is sequentially stored in the specified storage medium according to the cache sequence of the acquired image in the dump cache queue, so as to further reduce the influence on the storage performance of the specified storage medium.
The above is a detailed description of the control method for image real-time storage. In another embodiment described below, a control apparatus for real-time storage of images is also provided.
Fig. 11 is a schematic structural diagram of an exemplary control device for real-time image storage according to another embodiment of the present invention. Referring to fig. 11, the control device may include:
an image acquisition module 1110 for receiving a captured image output by an image sensor of a first camera;
the judgment detection module 1120 is configured to obtain a validity judgment result on the received acquired image, where if the validity judgment result is valid, it indicates that the acquired image includes the target object, and if the validity judgment result is invalid, it indicates that the acquired image does not include the target object;
the buffer adjustment module 1130 is configured to determine, according to the validity determination result, a buffer policy for transferring the acquired image to an image buffer queue in the image storage module, so that an enqueue image increment of the image buffer queue when the validity determination result is invalid is smaller than an enqueue image increment when the validity determination result is valid.
If the control device is carried by a processor of the first camera, the image cache queue may be disposed in the first camera, and the specified storage medium may be disposed in the first camera (the image cache queue may be disposed in the specified storage medium or another storage medium independent of the specified storage medium at this time), or in a computer in signal connection with the first camera, or in a storage device in signal connection with the computer.
If the control device is carried by a processor of a computer connected to the first camera via a signal, the image cache queue may be disposed in the computer, and the specified storage medium may be disposed in the computer (the image cache queue may be disposed in the specified storage medium or another storage medium independent of the specified storage medium at this time), or in a storage device connected to the computer via a signal.
In this embodiment, the determination detecting module 1120 may obtain the validity determination result by directly performing image recognition on the captured image, or may obtain the validity determination result by performing equivalent image recognition in a size chart manner, or may obtain the validity determination result according to the sensing signal of the sensor.
If the validity determination result is obtained by directly performing image recognition on the captured image, the determination detecting module 1120 may include:
and the first image identification submodule is used for carrying out image identification on the acquired collected image.
And the first result determining submodule is used for obtaining a validity judging result of the acquired image according to an image identification result of the acquired image, wherein if the image identification result shows that the target object is successfully identified, the validity judging result is valid, and otherwise, the validity judging result is invalid.
If the validity determination result is obtained by performing equivalent image recognition in a size map manner, the determination detecting module 1120 may include:
the auxiliary image acquisition sub-module is used for acquiring a received synchronous image of the acquired image, wherein the pixel specification of the synchronous image is smaller than that of the acquired image, and the synchronous image at least comprises a designated area of the acquired image, wherein the designated area is an area where the target object appears in the acquired image; for example, the auxiliary image acquisition sub-module may intercept a synchronous image containing the image content of the designated area from the captured image, or obtain a synchronous image output synchronously with the captured image from a second camera, wherein the overlapping part of the visual field range of the second camera and the visual field range of the first camera is used for imaging to obtain the image content of the designated area;
the second image recognition submodule is used for carrying out image recognition on the synchronous image;
and the second result determining submodule is used for obtaining a validity judging result of the acquired image according to the image identification result, wherein the validity judging result is valid if the image identification result shows that the target object is successfully identified, and the validity judging result is invalid if the image identification result shows that the target object is not successfully identified.
In this embodiment, if the determination detecting module 1120 may obtain the validity determination result by directly performing image recognition on the captured image, or may obtain the validity determination result by performing equivalent image recognition in a large-small graph manner, the determination detecting module 1120 may perform validity determination on each frame of the captured image, or perform validity determination periodically according to a preset sampling rate, that is, perform validity determination once every several frames of the captured image, and manage transmission of the captured image in the sampling period according to the determination result.
For the case that the validity determination performed by the determination detecting module 1120 is periodically triggered according to the preset sampling rate, the determination detecting module 1120 may further include a period timing sub-module for determining whether the current time is the period time for obtaining the validity determination result, and only when the current time is determined to be the period time for obtaining the validity determination result, the first image recognition sub-module or the second image recognition sub-module is triggered.
If the validity determination result is obtained according to the sensing signal of the sensor, the determination detecting module 1120 may include:
the signal state identification submodule detects the signal state of an induction signal for inducing a target object;
and the third result determining submodule is used for obtaining the validity judging result of the acquired image according to the signal state obtained by detection, wherein if the signal state indicates that the target object is induced, the validity judging result is valid, and otherwise, the validity judging result is invalid.
In the case where the sensing signal is generated by a sensor, if the sensing range of the sensor is located on the upstream side of the visual field range of the image sensor in the conveying path of the belt for conveying the target object, for a possible position offset between the sensing range of the sensor and the visual field range of the image sensor, the signal state identifying sub-module may avoid a delay deviation resulting from the validity determination by compensating for the position offset, and for example, the signal state identifying sub-module may be specifically configured to: and determining the signal state of the sensing signal synchronous with the acquired image acquired currently by using a preset delay time, wherein the delay time is determined according to the position offset between the sensing range of the sensor and the visual field range of the image sensor along the direction of the transmission belt and the transmission speed of the transmission belt.
In addition, the cache adjusting module 1130 may implement the adjustment of the cache policy in different manners.
For example, in the case that each frame of captured image is determined by the determination detecting module 1120 to perform validity determination, the buffer adjusting module 1130 may adjust the buffer policy by controlling the image queuing, that is, if the validity determination result is valid, the received captured image is sent to the image buffer queue; and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
For another example, if the validity determination result of the received captured image obtained by the determination detecting module 1120 is periodically triggered according to the preset sampling rate, then:
the buffer adjustment module 1130 may adjust the buffer policy by controlling the image queuing, that is, if the validity determination result is valid, allowing the acquired image received from the image sensor before the next cycle time arrives to be stored in the image buffer queue; if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue;
alternatively, the cache adjusting module 1130 may also select to adjust the cache policy by adjusting the image output amount of the image sensor of the first camera, that is, if the validity determination result is valid, the acquisition frame rate of the image sensor is set to the first frame rate; if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate; the second frame rate is greater than 0 and less than or equal to the first frame rate, and the second frame rate may be allowed to be equal to 0 when determining the validity determination result according to the sensing signal received from the sensor.
In another embodiment described below, a control system for real-time storage of images is also provided.
Fig. 12 is a schematic structural diagram of an exemplary control system for real-time image storage according to another embodiment of the present invention, as shown, including: a conveyor belt 1210, a first camera 1220, and a computer 1230, wherein,
a conveyor belt 1210 for conveying an object;
an acquisition area of the first camera 1220 covers a conveying path of the conveyor belt 1210 for acquiring an image while the conveyor belt 1210 conveys the object; obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, the collected image contains a target object, and if the validity judgment result is invalid, the collected image does not contain the target object; determining a caching strategy for transferring the collected image to an image caching queue of a specified storage medium according to the validity judgment result, so that the enqueueing image increment of the image caching queue when the validity judgment result is invalid is less than the enqueueing image increment when the validity judgment result is valid;
a computer 1230 for receiving the collected image outputted from the first camera 1220, and storing the collected image in a designated storage medium.
As can be seen from the system of fig. 12, in an application scenario where an object is transported along a conveyor belt, a first camera 1220 may be disposed downstream and above the conveyor belt 1210 to capture an image; the computer 1230 is provided separately from the first camera 1220 or in combination with the first camera 1220, which is not limited herein.
In the system shown in fig. 12, the conveyor belt 1210 may not be included, and the first camera 1220 and the computer 1230 interacting with the first camera 1220 may be configured on the transmission path of the existing conveyor belt 1210.
In this embodiment, the first camera 1220 may acquire the validity determination result by directly performing image recognition on the captured image, may acquire the validity determination result by performing equivalent image recognition in a size chart manner, or may acquire the validity determination result according to a sensing signal of the sensor.
If the validity determination result is obtained by directly performing image recognition on the captured image, the first camera 1220 may include: the first image identification submodule is used for carrying out image identification on the acquired image; and the first result determining submodule is used for obtaining a validity judging result of the acquired image according to an image identification result of the acquired image, wherein if the image identification result shows that the target object is successfully identified, the validity judging result is valid, and otherwise, the validity judging result is invalid.
If the validity determination result is obtained by performing equivalent image recognition in a size chart manner, the first camera 1220 may include: the auxiliary image acquisition sub-module is used for acquiring a received synchronous image of the acquired image, wherein the pixel specification of the synchronous image is smaller than that of the acquired image, and the synchronous image at least comprises a designated area of the acquired image, wherein the designated area is an area where the target object appears in the acquired image; for example, the auxiliary image acquisition sub-module may intercept a synchronous image containing the image content of the designated area from the captured image, or obtain a synchronous image output synchronously with the captured image from a second camera, wherein the overlapping part of the visual field range of the second camera and the visual field range of the first camera is used for imaging to obtain the image content of the designated area; the second image recognition submodule is used for carrying out image recognition on the synchronous image; and the second result determining submodule is used for obtaining a validity judging result of the acquired image according to the image identification result, wherein the validity judging result is valid if the image identification result shows that the target object is successfully identified, and the validity judging result is invalid if the image identification result shows that the target object is not successfully identified.
In addition, in this embodiment, if the first camera 1220 may obtain the validity determination result by directly performing image recognition on the captured image, or may obtain the validity determination result by performing equivalent image recognition in a large-small diagram manner, the first camera 1220 may perform validity determination on each frame of the captured image, or perform validity determination periodically according to a preset sampling rate, that is, perform validity determination once on every several frames of the captured image, and manage transmission of the captured image in the sampling period according to the determination result.
For the case that the validity judgment performed by the first camera 1220 is periodically triggered according to the preset sampling rate, the first camera 1220 may further include a period timing sub-module, configured to judge whether the current time is the period time for obtaining the validity judgment result, and trigger the first image recognition sub-module or the second image recognition sub-module only when the current time is judged to be the period time for obtaining the validity judgment result.
If the validity determination result is obtained from the sensing signal of the sensor, the system further includes a sensor disposed on the upstream side of the visual field range of the image sensor in the conveying path of the conveyor belt 1210, for detecting whether or not the target is present on the conveyor belt 1210, and transmitting a signal state of the sensing signal of the target;
the first camera 1220, further including:
the signal state identification submodule detects the signal state of an induction signal for inducing a target object;
and the third result determining submodule is used for obtaining the validity judging result of the acquired image according to the signal state obtained by detection, wherein if the signal state indicates that the target object is induced, the validity judging result is valid, and otherwise, the validity judging result is invalid.
In the case where the sensing signal is generated by a sensor, if the sensing range of the sensor is located on the upstream side of the visual field range of the image sensor in the conveying path of the belt for conveying the target object, for a possible position offset between the sensing range of the sensor and the visual field range of the image sensor, the signal state identifying sub-module may avoid a delay deviation resulting from the validity determination by compensating for the position offset, and for example, the signal state identifying sub-module may be specifically configured to: and determining the signal state of the sensing signal synchronous with the acquired image acquired currently by using a preset delay time, wherein the delay time is determined according to the position offset between the sensing range of the sensor and the visual field range of the image sensor along the direction of the transmission belt and the transmission speed of the transmission belt.
Additionally, the first camera 1220 may implement the adjustment to the caching policy in different ways.
For example, in the case that the validity determination is performed by the first camera 1220 for each frame of captured image, the caching policy may be adjusted by controlling the image queuing, that is, if the validity determination result is valid, the received captured image is sent to the image caching queue; and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
For another example, if the validity determination result of the first camera 1220 for acquiring the received captured image is periodically triggered according to the preset sampling rate, then:
the caching strategy can be adjusted through controlling the image queuing, namely, if the validity judgment result is valid, the collected image received from the image sensor before the next cycle time is reached is allowed to be stored in the image caching queue; if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue;
alternatively, the first camera 1220 may also select to adjust the caching policy by adjusting the image output amount of the image sensor of the first camera, that is, if the validity determination result is valid, the acquisition frame rate of the image sensor is set to the first frame rate; if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate; the second frame rate is greater than 0 and less than or equal to the first frame rate, and the second frame rate may be allowed to be equal to 0 when determining the validity determination result according to the sensing signal received from the sensor.
In one embodiment, an electronic device is also provided.
Fig. 13a and 13b are schematic diagrams of exemplary structures of an electronic device in a further embodiment.
Referring to fig. 13a, taking the electronic device as a first camera as an example, it may include:
an image sensor 1310, which may be a photosensitive imaging element such as a CMOS (Complementary Metal Oxide Semiconductor);
a processor 1320 for performing the control method as described in the previous embodiment;
non-volatile storage 1330 to store instructions that, when loaded by processor 1320, may cause processor 1320 to perform a control method as described in previous embodiments.
In addition, as an alternative, the electronic device (first camera) shown in fig. 13a may further: a buffer medium 1340 for loading an image buffer queue used by the control method according to the foregoing embodiment; and/or, the communication module 1350 is configured to transmit the collected images buffered in the image buffer queue; and/or a mass storage medium for use as a specified storage medium in the control method as described in the foregoing embodiments.
Referring to fig. 13b, taking the electronic device as a computer as an example, it may include:
a human-machine interaction module 1390, which may include at least one of a keyboard, mouse, and touch screen, for example;
a processor 1320 for performing the control method as described in the previous embodiment;
non-volatile storage 1330 to store instructions that, when loaded by processor 1320, may cause processor 1320 to perform a control method as described in previous embodiments.
In addition, as an alternative, the electronic device (first camera) shown in fig. 13b may further: a buffer medium 1340 for loading an image buffer queue used by the control method according to the foregoing embodiment; and/or, the communication module 1350 is configured to transmit the collected images buffered in the image buffer queue; and/or a mass storage medium for use as a specified storage medium in the control method as described in the foregoing embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A control method for real-time storage of images, the control method comprising:
receiving a captured image output by an image sensor of a first camera;
obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, the collected image contains a target object, and if the validity judgment result is invalid, the collected image does not contain the target object;
and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of the specified storage medium, so that the enqueueing image increment of the image caching queue when the validity judgment result is invalid is less than the enqueueing image increment when the validity judgment result is valid.
2. The control method according to claim 1, wherein obtaining a validity determination result for the received captured image comprises:
acquiring a synchronous image of a received collected image, wherein the pixel specification of the synchronous image is smaller than that of the collected image, and the synchronous image at least comprises a designated area of the collected image, and the designated area is an area where a target object appears in the collected image;
carrying out image recognition on the synchronous image;
and obtaining a validity judgment result of the acquired image according to the image identification result, wherein if the image identification result shows that the target object is successfully identified, the validity judgment result is valid, and otherwise, the validity judgment result is invalid.
3. The control method of claim 2, wherein acquiring a synchronized image of the received captured images comprises:
and intercepting a synchronous image containing the image content of the designated area from the acquired image.
4. The control method of claim 2, wherein acquiring a synchronized image of the received captured images comprises:
and obtaining a synchronous image which is output synchronously with the acquired image from the second camera, wherein the overlapping part of the visual field range of the second camera and the visual field range of the first camera is used for imaging to obtain the image content of the designated area.
5. The control method according to any one of claims 1 to 4, wherein obtaining the validity determination result for the received captured image is triggered frame by frame; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising:
if the validity judgment result is valid, sending the received collected image into an image cache queue;
and if the validity judgment result is invalid, giving up the operation of sending the received collected image into the image cache queue.
6. The control method according to claim 1, wherein obtaining the validity determination result for the received captured image is periodically triggered according to a preset sampling rate; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising:
if the validity judgment result is valid, allowing the collected image received from the image sensor before the next cycle time is reached to be stored in an image cache queue;
and if the validity judgment result is invalid, forbidding the collected image received from the image sensor before the next cycle time is reached to be stored in the image cache queue.
7. The control method according to claim 1, wherein obtaining the validity determination result for the received captured image is periodically triggered according to a preset sampling rate; and according to the validity judgment result, determining a caching strategy for unloading the collected image to an image caching queue of a specified storage medium, comprising:
if the validity judgment result is valid, setting the acquisition frame rate of the image sensor as a first frame rate;
if the validity judgment result is invalid, setting the acquisition frame rate of the image sensor as a second frame rate;
the second frame rate is greater than 0 and less than or equal to the first frame rate.
8. A control device for real-time storage of images, comprising:
the image acquisition module is used for receiving a collected image output by an image sensor of the first camera;
the judging and detecting module is used for obtaining the effectiveness judging result of the received collected image, wherein if the effectiveness judging result is effective, the collected image is indicated to contain the target object, and if the effectiveness judging result is invalid, the collected image is indicated to not contain the target object;
and the buffer adjustment module is used for determining a buffer strategy of an image buffer queue for transferring the acquired image to the image storage module according to the validity judgment result, so that the enqueue image increment of the image buffer queue when the validity judgment result is invalid is less than the enqueue image increment when the validity judgment result is valid.
9. A control system for real-time storage of images, comprising: a conveyor belt, a first camera and a computer, wherein,
a conveyor belt for conveying an object;
the acquisition area of the first camera covers the conveying path of the conveying belt and is used for acquiring images when the conveying belt conveys the target object; obtaining a validity judgment result of the received collected image, wherein if the validity judgment result is valid, the collected image contains a target object, and if the validity judgment result is invalid, the collected image does not contain the target object; determining a caching strategy for transferring the collected image to an image caching queue of a specified storage medium according to the validity judgment result, so that the enqueueing image increment of the image caching queue when the validity judgment result is invalid is less than the enqueueing image increment when the validity judgment result is valid;
and the computer is used for receiving the collected image output by the first camera from the first camera and storing the collected image in a specified storage medium.
10. An electronic device, comprising a processor configured to execute the control method according to any one of claims 1 to 7;
the electronic device is a first camera including an image sensor, and the specified storage medium is located in the first camera, or in a computer in signal connection with the first camera, or in a storage device in signal connection with the computer; alternatively, the first and second electrodes may be,
the electronic device is a computer in signal connection with the first camera, and the specified storage medium is located in the computer or in a storage device in signal connection with the computer.
CN202011587987.3A 2020-12-29 2020-12-29 Control method and control device for image real-time storage and electronic equipment Active CN112770047B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011587987.3A CN112770047B (en) 2020-12-29 2020-12-29 Control method and control device for image real-time storage and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011587987.3A CN112770047B (en) 2020-12-29 2020-12-29 Control method and control device for image real-time storage and electronic equipment

Publications (2)

Publication Number Publication Date
CN112770047A true CN112770047A (en) 2021-05-07
CN112770047B CN112770047B (en) 2022-09-30

Family

ID=75696692

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011587987.3A Active CN112770047B (en) 2020-12-29 2020-12-29 Control method and control device for image real-time storage and electronic equipment

Country Status (1)

Country Link
CN (1) CN112770047B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394379A (en) * 2014-12-05 2015-03-04 北京厚吉科技有限公司 Fast previewing system and fast viewing method of surveillance video
WO2018037790A1 (en) * 2016-08-24 2018-03-01 ソニー株式会社 Image processing device, image capturing device, image processing method, and program
CN108401110A (en) * 2018-03-18 2018-08-14 广东欧珀移动通信有限公司 Acquisition methods, device, storage medium and the electronic equipment of image
CN108462842A (en) * 2018-05-14 2018-08-28 恒玄科技(上海)有限公司 A kind of high accuracy, the screen monitoring method of low-power consumption and monitoring system
CN111695512A (en) * 2020-06-12 2020-09-22 嘉应学院 Unattended cultural relic monitoring method and device
CN111698457A (en) * 2019-03-15 2020-09-22 程爱军 Safety monitoring type wireless communication terminal
US20200404190A1 (en) * 2017-08-22 2020-12-24 Alarm.Com Incorporated Preserving privacy in surveillance

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104394379A (en) * 2014-12-05 2015-03-04 北京厚吉科技有限公司 Fast previewing system and fast viewing method of surveillance video
WO2018037790A1 (en) * 2016-08-24 2018-03-01 ソニー株式会社 Image processing device, image capturing device, image processing method, and program
US20200404190A1 (en) * 2017-08-22 2020-12-24 Alarm.Com Incorporated Preserving privacy in surveillance
CN108401110A (en) * 2018-03-18 2018-08-14 广东欧珀移动通信有限公司 Acquisition methods, device, storage medium and the electronic equipment of image
CN108462842A (en) * 2018-05-14 2018-08-28 恒玄科技(上海)有限公司 A kind of high accuracy, the screen monitoring method of low-power consumption and monitoring system
CN111698457A (en) * 2019-03-15 2020-09-22 程爱军 Safety monitoring type wireless communication terminal
CN111695512A (en) * 2020-06-12 2020-09-22 嘉应学院 Unattended cultural relic monitoring method and device

Also Published As

Publication number Publication date
CN112770047B (en) 2022-09-30

Similar Documents

Publication Publication Date Title
JP5855538B2 (en) Imaging apparatus, imaging system, imaging method, and program
US9232137B2 (en) Motion blur avoidance
US20070188617A1 (en) Apparatus and method for reducing image blur in a digital camera
CN111193866B (en) Image processing method, image processor, photographing device and electronic equipment
TW201222478A (en) Tracking system and method for image object region and computer program product thereof
US20150326784A1 (en) Image capturing control method and image pickup apparatus
CN110177215A (en) Image processing method, image processor, filming apparatus and electronic equipment
KR102305118B1 (en) Method for stabilizing image and electronic device thereof
CN112770047B (en) Control method and control device for image real-time storage and electronic equipment
EP3576403B1 (en) Improved frame selection to provide for a zero shutter lag in a digital camera
CN107370936B (en) Zoom method and zoom device
US7515191B2 (en) Digital camera and solid-state image pickup unit
US20100085439A1 (en) Image capture device and method thereof
CN112598567B (en) Method for enhancing images in infrared real-time jigsaw by FPGA
US20230008550A1 (en) Sensor with low power synchronous readout
CN111193867B (en) Image processing method, image processor, photographing device and electronic equipment
CN110636219B (en) Video data stream transmission method and device
KR102058243B1 (en) Blackbox Apparatus and Method for Transferring Moving Pictures through the LPWAN
JP6438629B2 (en) Imaging device
JP6083964B2 (en) Transmission device, transmission method, and program
JP6740002B2 (en) Control device, control method and program
WO2014038927A1 (en) Load balancing of graphics processing units in an image processing system
US20080062285A1 (en) Camera with an image sensor that doubles as a motion sensor
KR102058241B1 (en) Blackbox Apparatus and Method for Transferring Moving Pictures through the LPWAN
JP6729080B2 (en) Signal processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: 310051 room 304, B / F, building 2, 399 Danfeng Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.