CN111093037A - Image data receiving method, image capturing apparatus, and artificial retina apparatus - Google Patents

Image data receiving method, image capturing apparatus, and artificial retina apparatus Download PDF

Info

Publication number
CN111093037A
CN111093037A CN202010202531.4A CN202010202531A CN111093037A CN 111093037 A CN111093037 A CN 111093037A CN 202010202531 A CN202010202531 A CN 202010202531A CN 111093037 A CN111093037 A CN 111093037A
Authority
CN
China
Prior art keywords
image
image data
data packet
usb
frame
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
CN202010202531.4A
Other languages
Chinese (zh)
Other versions
CN111093037B (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.)
Shenzhen Zhongke Xianjian Medical Technology Co ltd
Original Assignee
Shenzhen Zhongke Xianjian Medical 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 Shenzhen Zhongke Xianjian Medical Technology Co ltd filed Critical Shenzhen Zhongke Xianjian Medical Technology Co ltd
Priority to CN202010202531.4A priority Critical patent/CN111093037B/en
Publication of CN111093037A publication Critical patent/CN111093037A/en
Application granted granted Critical
Publication of CN111093037B publication Critical patent/CN111093037B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/183Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a single remote source

Landscapes

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

Abstract

The present application relates to an image data receiving method, an image capturing apparatus and an artificial retina apparatus; the method comprises the steps that when a USB host interface driver is implanted and a timer is interrupted, an image data packet of a current frame image transmitted by a USB microcontroller through a USB interface is received in a segmented mode according to a preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller; when the fact that the received image data packet of the current frame image is one frame of image data is detected, the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface is received in a segmented mode according to the preset byte length, under the condition that the timer is interrupted, the fact that the complete image data packet is received in batches according to the preset byte length is achieved, and therefore the problem that the STM32 single chip microcomputer cannot drive the USB interface to receive the image data is solved, and further long-distance separation of the STM32 single chip microcomputer and the CMOS photosensitive lens is achieved.

Description

Image data receiving method, image capturing apparatus, and artificial retina apparatus
Technical Field
The present application relates to the field of image acquisition technologies, and in particular, to an image data receiving method, an image acquisition device, and an artificial retina device.
Background
Along with the continuous development of camera technique, the application of camera module is more and more extensive, and the camera module is also more and more required miniaturization, for example, all can use the camera on monitoring products, artificial retina product etc. a great deal of products, in order to can normally gather image data, can connect the camera to use together on the singlechip, at present, the mode of realizing being connected of camera and singlechip divide into two roughly: firstly, a Data Center Management Interface (DCMI) Interface on a single chip microcomputer (for example, an STM32 series single chip microcomputer) is connected with a Digital Video Port (DVP) parallel Port camera; secondly, a camera is connected to an ARM (Advanced RISC Machine) platform running an embedded Linux system, and the method requires support of a Central Processing Unit (CPU), a memory, a storage and other modules, but in the implementation process, the inventor finds that at least the following problems exist in the conventional technology: the traditional STM32 single chip microcomputer cannot drive the image acquisition module through a USB (Universal Serial Bus) interface, so that the image acquisition module and the single chip microcomputer cannot be separately applied.
Disclosure of Invention
Based on this, it is necessary to provide an image data receiving method, an image acquisition device and an artificial retina device for solving the problem that the conventional STM32 single chip microcomputer cannot drive the image acquisition module through the USB interface, so that the image acquisition module and the single chip microcomputer cannot be separately applied.
In order to achieve the above object, an embodiment of the present application provides an image data receiving method, including the following steps:
when a USB host interface driver is implanted and the timer is interrupted, receiving image data packets of the current frame image transmitted by a USB microcontroller through a USB interface in a subsection mode according to the preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller;
and when the received image data packet of the current frame image is detected to be one frame of image data, receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length.
In one embodiment, before the step of receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface in segments with the preset byte length, the method further includes the steps of:
judging whether to switch the resolution of the image acquisition module according to the received image data packet of the current frame image;
if the resolution of the image acquisition module is maintained, starting to receive an image data packet of the next frame of image;
and if the resolution of the image acquisition module is switched, controlling the timer to pause, and restarting to receive the image data packet when the switching of the resolution of the image acquisition module is finished.
In one embodiment, the step of receiving, in segments with a preset byte length, the image data packet of the current frame image transmitted by the USB microcontroller through the USB interface when the control timer is interrupted includes the steps of:
when receiving current segment data in an image data packet of a current frame image, detecting whether the number of bytes of the current segment data is equal to a preset byte length;
if the byte number of the current segment of data is equal to the length of the preset byte, receiving the next segment of data in the image data packet of the current frame image;
and if the byte number of the current segment of data is larger than or smaller than the preset byte length, returning to re-receive the current segment of data, and transmitting error times to accumulate by 1.
In one embodiment, the method further comprises the following steps:
when detecting that the received image data packet of the current frame image is not equal to one frame of image data, detecting whether the transmission error times are greater than preset times;
if the transmission error times are less than or equal to the preset times, receiving an image data packet of the next frame of image;
if the transmission error times are larger than the preset times, the USB microcontroller is reset, and when the USB microcontroller is reset, the image data packet is restarted and received.
In one embodiment, the method further comprises the following steps:
and buffering and storing the received image data packet of the current frame image.
An image data receiving apparatus comprising:
the first data receiving module is used for receiving image data packets of the current frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to a preset byte length when a USB host interface driver is implanted and a timer is interrupted; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller;
and the second data receiving module is used for receiving the image data packet of the next frame of image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length when the received image data packet of the current frame of image is detected to be the image data of one frame.
An image acquisition device comprises an STM32 single chip microcomputer, a USB microcontroller and an image acquisition module;
the USB microcontroller is connected with the STM32 singlechip through a USB interface; the USB microcontroller is connected with the image acquisition module through the DVP parallel port and the IIC interface respectively, and is used for receiving image data packets of each frame of image acquired and transmitted by the image acquisition module;
the STM32 single chip microcomputer is used for receiving image data packets of a current frame image transmitted by the USB microcontroller through the USB interface in a segmented mode according to a preset byte length when a USB host interface driver is implanted and a timer is interrupted;
the STM32 single chip microcomputer is also used for receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface according to the preset byte length segment when detecting that the received image data packet of the current frame image is one frame image data.
In one embodiment, the intelligent electronic device further comprises a display connected with the STM32 single-chip microcomputer.
In one embodiment, the USB microcontroller is a CY7C68013A type USB microcontroller; the image acquisition module is OV7725, OV5640 or MT9M001 type image acquisition module.
An artificial retina device comprises a frame and the image acquisition device;
an image acquisition module of the image acquisition equipment is arranged on the mirror frame.
One of the above technical solutions has the following advantages and beneficial effects:
the image data receiving method provided by each embodiment of the application comprises the following steps: when a USB host interface driver is implanted and the timer is interrupted, receiving image data packets of the current frame image transmitted by a USB microcontroller through a USB interface in a subsection mode according to the preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller; when the fact that the received image data packet of the current frame image is one frame of image data is detected, the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface is received in a segmented mode according to the preset byte length, the STM32 single chip microcomputer receives the complete image data packet in batches according to the preset byte length under the condition that the timer is interrupted, and therefore the problem that the STM32 single chip microcomputer cannot drive the USB interface to receive the image data transmitted by the CMOS photosensitive lens is solved, and further long-distance separation of the STM32 single chip microcomputer and the CMOS photosensitive lens is achieved.
Drawings
Fig. 1 is a schematic flowchart of an image data receiving method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram illustrating the steps of verifying detection of each piece of data in one embodiment;
FIG. 3 is a flowchart illustrating the steps of verifying and detecting image data packets for each frame of image in one embodiment;
FIG. 4 is a flowchart illustrating the step of switching resolution according to one embodiment;
FIG. 5 is a schematic structural diagram of an image capturing device according to an embodiment of the present application;
fig. 6 is a schematic diagram of the structure of the artificial retina device according to the present application in one embodiment.
Detailed Description
To facilitate an understanding of the present application, the present application will now be described more fully with reference to the accompanying drawings. Preferred embodiments of the present application are shown in the drawings. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "connected" to another element, it can be directly connected to the other element and be integral therewith, or intervening elements may also be present. The term "mounted" and the like are used herein for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the description of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
In order to solve the problem that the image acquisition module cannot be driven by the conventional STM32 single chip microcomputer through the USB interface, and thus the image acquisition module and the single chip microcomputer cannot be separately applied, in an embodiment, as shown in fig. 1, an image data receiving method is provided, which includes the following steps:
step S110, when a USB host interface driver is implanted and timer interruption occurs, receiving image data packets of a current frame image transmitted by a USB microcontroller through a USB interface in a subsection mode according to a preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller.
It should be noted that, the STM32 single chip microcomputer and the USB camera are separated for use in a long distance, so that the USB camera is connected to the STM32 single chip microcomputer through a data line with a certain length (for example, greater than 15 cm), the application of intelligent equipment (such as artificial retina equipment) is met, the STM32 single chip microcomputer and the camera are connected through the USB interface to realize long-distance split use, however, codes in the STM32 singlechip in the conventional technology cannot drive the USB interface to receive image data transmitted by the camera, and in order to solve the above problems, the present application proposes an image data receiving method, before the image data receiving method is operated, a driver of the USBhost interface needs to be implanted into the USB host interface (the USB interface of the main device) side of the STM32 singlechip, the driver is DWC-OTG driver adapted to STM32 single chip microcomputer, and various Linux system API interface programs are compiled according to STM32 single chip microcomputer. Wherein, the STM32 singlechip can be STM32F4XX, STM32F7XX or STM32H7XX type STM32 singlechip.
The image acquisition module comprises a CMOS photosensitive lens and a photosensitive lens image sensor, wherein the CMOS photosensitive lens acquires image data, an image data packet of one frame of image is transmitted to a USB microcontroller through the photosensitive lens image sensor, and the image data packet is transmitted to an STM32 single chip microcomputer through a USB interface by the USB microcontroller, wherein the image acquisition module can be an OV7725, an OV5640 or an MT9M001 type image acquisition module, the USB microcontroller is a CY7C68013A type USB microcontroller, and the USB interface is a USB2.0 interface. In one example, when the resolution of the image acquisition module is 640 × 480, the frame rate is 10FPS (frames per second), and the data format is YUV format, the number of bytes of the image data packet of one frame of image is 614400.
When the STM32 single chip microcomputer receives the image data packets of each frame of image, the start of a timer in the single chip microcomputer is controlled, then the image data packets of each frame of image are received in the process of timer interruption, in order to avoid the situation that the image data packets are too large to be completely received at one time, the STM32 single chip microcomputer receives the image data packets of each frame of image in a segmentation mode according to the preset byte length, namely the image data packets of each frame of image are segmented into a plurality of segments of data according to the preset byte length, and the image data packets of each frame of image are received for a plurality of times. Further, if the number of bytes of the image data packet is less than or equal to the preset byte length, the image data packet is not segmented and is received at one time.
Taking an image acquisition module with a resolution of 640x480 and a frame rate of 10FPS (frames per second) and a data format of YUV format as an example, the STM32 single chip microcomputer divides an image data packet with a byte number of 614400 according to a preset byte length of 16384 bytes, and receives image data in segments, so that the situation of data loss caused by the fact that the STM32 single chip microcomputer cannot receive large data amount of data completely at one time due to low performance is avoided.
In the process of receiving data by the STM32 single chip microcomputer, in order to ensure complete and correct reception of the data, the received data needs to be detected, and in an example, as shown in fig. 2, when the control timer is interrupted, the step of receiving the image data packet of the current frame image transmitted by the USB microcontroller through the USB interface in segments according to the preset byte length includes the steps of:
step S210, when receiving the current segment data in the image data packet of the current frame image, detecting whether the byte number of the current segment data is equal to the preset byte length;
if the byte number of the current segment of data is equal to the length of the preset byte, receiving the next segment of data in the image data packet of the current frame image;
and if the byte number of the current segment of data is larger than or smaller than the preset byte length, returning to re-receive the current segment of data, and transmitting error times to accumulate by 1.
It should be noted that, in the process of receiving image data packets of each frame image in a segmented manner, each segment of data is received by the STM32 single chip microcomputer, verification and detection are performed on the segment of data, it is ensured that each segment of data is received completely and correctly, and errors in the data transmission process are found in time.
In order to further ensure correct and complete received data, the STM32 single chip microcomputer not only verifies and detects each segment of data into which the image data packet of each frame of image is divided, but also needs to verify and detect the image data packet after receiving one image data packet, in an example, as shown in fig. 3, the image data receiving method of the present application further includes the steps of:
when detecting that the received image data packet of the current frame image is not equal to one frame of image data, detecting whether the transmission error times are greater than preset times;
if the transmission error times are less than or equal to the preset times, receiving an image data packet of the next frame of image;
if the transmission error times are larger than the preset times, the USB microcontroller is reset, and when the USB microcontroller is reset, the image data packet is restarted and received.
It should be noted that, when the STM32 single chip microcomputer receives an image data packet of one frame of image in a segmented manner, the single chip microcomputer verifies and detects the image data packet, and detects whether the image data packet is equal to one frame of image data (for example, whether the image data packet is equal to 614400 bytes), if so, it indicates that the received image data packet of the frame of image is complete; if not, judging whether the transmission error frequency in the data transmission process is greater than the preset frequency, if the transmission error frequency is less than or equal to the preset frequency, ignoring the data transmission error, continuously receiving the image data packet of the next frame of image, if the transmission error frequency is greater than the preset frequency, resetting the USB microcontroller, and restarting to receive the image data packet when the USB microcontroller is finished. In one example, the USB microcontroller may be reset manually, e.g., the USB interface is disconnected manually. In another example, the USB microcontroller may be automatically reset, e.g., controlled to power down automatically to reset the USB microcontroller.
Step S120, when it is detected that the received image data packet of the current frame image is one frame of image data, receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length.
It should be noted that, after receiving the image data packet of the current frame image, it is checked whether the image data packet of the current frame image is the image data of one frame, and when the image data packet of the current frame image is the image data of one frame, the receiving of the image data packet of the next frame image is started.
In order to improve the data processing efficiency and avoid the resolution excess, in an embodiment, as shown in fig. 4, before the step of receiving the image data packet of the next frame of image transmitted by the USB microcontroller through the USB interface in segments with a preset byte length, the method further includes the steps of:
judging whether to switch the resolution of the image acquisition module according to the received image data packet of the current frame image;
if the resolution of the image acquisition module is maintained, starting to receive an image data packet of the next frame of image;
and if the resolution of the image acquisition module is switched, controlling the timer to pause, and restarting to receive the image data packet when the switching of the resolution of the image acquisition module is finished.
It should be noted that, after receiving the image data packet of the current frame image, determining whether the resolution is too large according to the image data packet of the current frame image, if the resolution is too large, controlling the timer to pause, restarting to receive the image data packet when switching the resolution of the image acquisition module is completed, and if the resolution is proper, maintaining the current resolution of the image acquisition module and receiving the image data packet of the next frame image.
Further, in the process of switching the resolution of the image capturing module, the frame rate of the image capturing module needs to be set, because the frame rate is determined according to the resolution, specifically, the initialization and configuration of the image sensor of the photosensitive lens are performed by setting a series of registers and corresponding values thereof through an Inter-Integrated Circuit (IIC) interface, querying the corresponding resolution/frame rate/ISP related parameter registers, and modifying the registers to the corresponding calculated values.
In order to improve the efficiency of receiving and processing image data and facilitate the use, in one embodiment, the image data receiving method further comprises the following steps:
and buffering and storing the received image data packet of the current frame image.
It should be noted that, the STM32 single chip microcomputer receives image data through the USB interface, the frame rate is very fast, and the maximum frame rate can reach 60FPS, while the data processing speed of the STM32 single chip microcomputer may not be synchronous, so that the processing of buffer storage is added. In one example, about 8 buffer memory intervals (determined according to the memory size configured by the hardware of the single chip microcomputer) are set first, then 1 buffer memory is taken out from the buffer pool free list, when the image data packet of one frame of image is received, the buffer memory is placed into the ready list, correspondingly, when the STM32 single chip microcomputer processes data, the previously placed buffer memory data is directly taken out from the ready list, and then the required data processing is performed. Therefore, the receiving and processing of the data are not conflicted, and the operation efficiency is improved.
The image data receiving method provided by each embodiment of the application comprises the following steps: when a USB host interface driver is implanted and the timer is interrupted, receiving image data packets of the current frame image transmitted by a USB microcontroller through a USB interface in a subsection mode according to the preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller; when the fact that the received image data packet of the current frame image is one frame of image data is detected, the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface is received in a segmented mode according to the preset byte length, the STM32 single chip microcomputer receives the complete image data packet in batches according to the preset byte length under the condition that the timer is interrupted, and therefore the problem that the STM32 single chip microcomputer cannot drive the USB interface to receive the image data transmitted by the CMOS photosensitive lens is solved, and further long-distance separation of the STM32 single chip microcomputer and the CMOS photosensitive lens is achieved.
It should be understood that although the various steps in the flow charts of fig. 1-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 1-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, there is provided an image data receiving apparatus including:
the first data receiving module is used for receiving image data packets of the current frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to a preset byte length when a USB host interface driver is implanted and a timer is interrupted; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller;
and the second data receiving module is used for receiving the image data packet of the next frame of image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length when the received image data packet of the current frame of image is detected to be the image data of one frame.
For specific limitations of the image data receiving device, reference may be made to the above limitations of the image data receiving method, which are not described herein again. The respective modules in the image data receiving apparatus may be wholly or partially implemented by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, as shown in fig. 5, there is also provided an image capturing apparatus, including an STM32 single chip microcomputer 51, a USB microcontroller 53, and an image capturing module 55;
the USB microcontroller 53 is connected with the STM32 singlechip 51 through a USB interface; the USB microcontroller 53 is connected with the image acquisition module 55 through a DVP parallel port and an IIC interface respectively; the USB microcontroller 53 is configured to receive an image data packet of each frame of image collected and transmitted by the image collection module 55;
the STM32 single chip microcomputer 51 is used for receiving the image data packet of the current frame image transmitted by the USB microcontroller 53 through the USB interface in a segmented manner according to the preset byte length when the control timer is interrupted;
the STM32 single chip 51 is further configured to receive, in segments according to a preset byte length, an image data packet of a next frame of image transmitted by the USB microcontroller 53 through the USB interface when detecting that the received image data packet of the current frame of image is one frame of image data.
In one example, the USB microcontroller is a CY7C68013A model USB microcontroller. In one example, the image acquisition module is an OV7725, OV5640, or MT9M001 type image acquisition module.
Further, this application image acquisition equipment still includes the display of connecting the STM32 singlechip.
It should be noted that, for the operation process of the image acquisition device of the present application, reference may be made to the description of each embodiment of the image data receiving method of the present application, and details are not described here again.
In one embodiment, as shown in fig. 6, there is also provided an artificial retina device, comprising a frame 61 and an image capturing device according to the embodiments of the image capturing device of the present application;
the image pickup module 55 of the image pickup device is mounted on the frame 61.
It should be noted that the image capturing device in this embodiment is the same as the image capturing device in each embodiment of the image capturing device in the present application, and for specific description, reference is made to each embodiment of the image capturing device in the present application, and details are not repeated here.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the claims. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. An image data receiving method, characterized by comprising the steps of:
when a USB host interface driver is implanted and the timer is interrupted, receiving image data packets of the current frame image transmitted by a USB microcontroller through a USB interface in a subsection mode according to the preset byte length; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller;
and when the received image data packet of the current frame image is detected to be one frame of image data, receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length.
2. The image data receiving method according to claim 1, wherein before the step of receiving the image data packet of the next frame image transmitted by the USB microcontroller through the USB interface in segments according to the preset byte length, the method further comprises the steps of:
judging whether to switch the resolution of the image acquisition module according to the received image data packet of the current frame image;
if the resolution of the image acquisition module is maintained, starting to receive an image data packet of the next frame of image;
and if the resolution of the image acquisition module is switched, controlling a timer to pause, and restarting to receive the image data packet when the switching of the resolution of the image acquisition module is finished.
3. The image data receiving method according to claim 1, wherein the step of receiving the image data packet of the current frame image transmitted by the USB microcontroller through the USB interface in segments of a preset byte length when the control timer is interrupted, comprises the steps of:
when receiving the current segment data in the image data packet of the current frame image, detecting whether the number of bytes of the current segment data is equal to the preset byte length;
if the byte number of the current segment of data is equal to the preset byte length, receiving the next segment of data in the image data packet of the current frame of image;
and if the byte number of the current segment of data is larger than or smaller than the preset byte length, returning to re-receive the current segment of data, and accumulating 1 for the number of transmission errors.
4. The image data receiving method according to claim 3, characterized by further comprising the steps of:
when detecting that the received image data packet of the current frame image is not equal to one frame of image data, detecting whether the transmission error times are greater than preset times;
if the transmission error times are less than or equal to the preset times, receiving an image data packet of the next frame of image;
if the transmission error times are larger than the preset times, resetting the USB microcontroller, and restarting to receive the image data packet when the USB microcontroller is reset.
5. The image data receiving method according to any one of claims 1 to 4, characterized by further comprising the steps of:
and buffering and storing the received image data packet of the current frame image.
6. An image data receiving apparatus, comprising:
the first data receiving module is used for receiving image data packets of the current frame image transmitted by the USB microcontroller through the USB interface in a segmented manner according to a preset byte length when a USB host interface driver is implanted and a timer is interrupted; the image data packet is a frame of image data which is collected by the image collection module and transmitted to the USB microcontroller;
and the second data receiving module is used for receiving the image data packet of the next frame of image transmitted by the USB microcontroller through the USB interface in a segmented manner according to the preset byte length when the received image data packet of the current frame of image is detected to be one frame of image data.
7. An image acquisition device is characterized by comprising an STM32 single chip microcomputer, a USB microcontroller and an image acquisition module;
the USB microcontroller is connected with the STM32 singlechip through a USB interface; the USB microcontroller is connected with the image acquisition module through a DVP parallel port and an IIC interface respectively;
the USB microcontroller is used for receiving image data packets of each frame of image collected and transmitted by the image collection module;
the STM32 single chip microcomputer is used for receiving image data packets of a current frame image transmitted by the USB microcontroller through the USB interface in a segmented mode according to a preset byte length when a USB host interface driver is implanted and a timer is interrupted;
the STM32 single chip microcomputer is also used for receiving the image data packet of the next frame of image transmitted by the USB microcontroller through the USB interface according to the preset byte length segment when the received image data packet of the current frame of image is detected to be one frame of image data.
8. The image acquisition device of claim 7, further comprising a display connected to the STM32 single chip microcomputer.
9. The image capturing device of claim 7 or 8, wherein the USB microcontroller is a USB microcontroller type CY7C 68013A; the image acquisition module is an OV7725, OV5640 or MT9M001 type image acquisition module.
10. An artificial retina device, comprising a frame and an image capturing device according to any one of claims 7 to 9;
and an image acquisition module of the image acquisition equipment is arranged on the mirror frame.
CN202010202531.4A 2020-03-20 2020-03-20 Image data receiving method, image capturing apparatus, and artificial retina apparatus Active CN111093037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010202531.4A CN111093037B (en) 2020-03-20 2020-03-20 Image data receiving method, image capturing apparatus, and artificial retina apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010202531.4A CN111093037B (en) 2020-03-20 2020-03-20 Image data receiving method, image capturing apparatus, and artificial retina apparatus

Publications (2)

Publication Number Publication Date
CN111093037A true CN111093037A (en) 2020-05-01
CN111093037B CN111093037B (en) 2021-01-08

Family

ID=70400582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010202531.4A Active CN111093037B (en) 2020-03-20 2020-03-20 Image data receiving method, image capturing apparatus, and artificial retina apparatus

Country Status (1)

Country Link
CN (1) CN111093037B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626006A (en) * 2021-10-11 2021-11-09 深圳市中科先见医疗科技有限公司 Image processing method and device based on RT Thread operating system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040186978A1 (en) * 2003-02-24 2004-09-23 Weltrend Semiconductor, Inc. High-speed single chip microcomputer
CN101841636A (en) * 2010-04-20 2010-09-22 华东师范大学 Photoelectric imaging system based on low-dimensional quantum structure photoelectricity sensor reading circuit
CN203838718U (en) * 2014-01-13 2014-09-17 杭州电子科技大学 Digital code disc automatic reading apparatus based on image processing
CN104298235A (en) * 2014-08-25 2015-01-21 洛阳理工学院 Mobile robot system based on wireless video transmission and PID compound control
CN104503306A (en) * 2014-11-26 2015-04-08 北京航空航天大学 Multi-camera synchronous triggering device and control method
CN105856239A (en) * 2016-06-12 2016-08-17 江苏若博机器人科技有限公司 Three-core eight-axle tracked high-speed natural gas pipeline robot control system
CN205610824U (en) * 2016-05-06 2016-09-28 武汉大学 First image acquisition of city surveillance camera and environmental parameter mark system
CN205692214U (en) * 2016-05-17 2016-11-16 中国地质大学(武汉) A kind of monocular vision pose measurement system
CN106412493A (en) * 2016-01-06 2017-02-15 公安海警学院 ARM-based embedded portable multifunctional image acquisition system
CN107197116A (en) * 2017-05-25 2017-09-22 天津大学 One kind is based on the real-time reliable graph of udp protocol as transmission plan
CN108769504A (en) * 2018-03-20 2018-11-06 北京德融汇科技有限公司 A kind of infrared camera that function is activated with In vivo detection applied to ATM

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040186978A1 (en) * 2003-02-24 2004-09-23 Weltrend Semiconductor, Inc. High-speed single chip microcomputer
CN101841636A (en) * 2010-04-20 2010-09-22 华东师范大学 Photoelectric imaging system based on low-dimensional quantum structure photoelectricity sensor reading circuit
CN203838718U (en) * 2014-01-13 2014-09-17 杭州电子科技大学 Digital code disc automatic reading apparatus based on image processing
CN104298235A (en) * 2014-08-25 2015-01-21 洛阳理工学院 Mobile robot system based on wireless video transmission and PID compound control
CN104503306A (en) * 2014-11-26 2015-04-08 北京航空航天大学 Multi-camera synchronous triggering device and control method
CN106412493A (en) * 2016-01-06 2017-02-15 公安海警学院 ARM-based embedded portable multifunctional image acquisition system
CN205610824U (en) * 2016-05-06 2016-09-28 武汉大学 First image acquisition of city surveillance camera and environmental parameter mark system
CN205692214U (en) * 2016-05-17 2016-11-16 中国地质大学(武汉) A kind of monocular vision pose measurement system
CN105856239A (en) * 2016-06-12 2016-08-17 江苏若博机器人科技有限公司 Three-core eight-axle tracked high-speed natural gas pipeline robot control system
CN107197116A (en) * 2017-05-25 2017-09-22 天津大学 One kind is based on the real-time reliable graph of udp protocol as transmission plan
CN108769504A (en) * 2018-03-20 2018-11-06 北京德融汇科技有限公司 A kind of infrared camera that function is activated with In vivo detection applied to ATM

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZCSHOUEXP: "STM32 之三 标准外设版USB驱动库详解(架构+文件+函数+使用说明+示例程序)", 《CSDN》 *
无: "stm32全系列通用usb驱动程序host驱动库 最新版", 《绿色资源网》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113626006A (en) * 2021-10-11 2021-11-09 深圳市中科先见医疗科技有限公司 Image processing method and device based on RT Thread operating system

Also Published As

Publication number Publication date
CN111093037B (en) 2021-01-08

Similar Documents

Publication Publication Date Title
CN107948463B (en) Camera synchronization method, device and system
CN111093037B (en) Image data receiving method, image capturing apparatus, and artificial retina apparatus
CN111818632B (en) Method, device, equipment and storage medium for equipment synchronization
CN104427232B (en) A kind of method, apparatus and system for realizing IMAQ
US11020853B2 (en) Robot, method for controlling motion of a robot and non-transitory readable medium
CN116684659B (en) Video output control module, method, equipment and server of BMC chip
CN104579774A (en) Switching method and device for main control equipment
CN113099108A (en) Control method and device of camera equipment
CN112148322A (en) Method for upgrading firmware in single chip microcomputer connected with system on chip
CN112995515B (en) Data processing method and device, storage medium and electronic device
CN110502369A (en) A kind of method, apparatus and storage medium of equipment crash recovery
CN113179170A (en) Method and device for processing abnormity of power receiving end equipment, power supply end equipment and medium
CN105450980A (en) Method and system for controlling high-definition aerial photography and returning videos
CN112769196B (en) Charging control method and device, electronic equipment and charger
CN105052214B (en) A kind of method and WIFI access point reducing WIFI access point power consumption
WO2020102940A1 (en) Abnormality processing method, terminal device and storage medium
US20130029732A1 (en) Apparatus and method for controlling function of communication module in portable terminal
CN108271059B (en) Method for displaying television signal
EP3739820A1 (en) Communication method and communication device for multi-machine communication system
JP6744876B2 (en) Image transmitting device, image communication system, image transmitting method, and program
WO2021042341A1 (en) Video display method, receiving end, system and storage medium
CN114245483B (en) Communication monitoring reconnection method and system for gastroenteroscope capsule
CN114143469B (en) Lens control method, system, electronic device and storage medium
CN117978749B (en) Method and system for realizing data source flow control based on FPGA
CN117033276B (en) Bus communication method, system, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant