Network camera module for outputting digital image signal for production detection
By switching software programs in the webcam module and multiplexing the USB 2.0 interface, the delay and EMI problems in the webcam production process are solved, and efficient production inspection and EMC certification are achieved.
Patent Information
- Application Number
- CN202510754439.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-06
- Publication Date
- 2025-08-26
AI Technical Summary
The network camera is inefficient due to network initialization delay in the production process, and the existing fast image production scheme is prone to cause electromagnetic interference (EMI) problems that cannot pass EMC certification.
Switch two sets of software programs through GPIO pin level detection, multiplexed SoC's USB 2.0 interface to realize user mode and production detection mode on the same hardware platform, skip the initialization of the network protocol stack, and directly output uncompressed/low-compressed digital image signals to avoid external image sensor data lines.
Significantly shortens the waiting time from power-on initialization to output images, improves production detection efficiency by more than 15 times, meets EMC compatibility requirements, and reduces production costs.
Smart Images

Figure CN120547425A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network camera modules, and in particular to a dual-mode network camera module that implements production focusing and image detection functions by reusing the USB 2.0 interface of an SoC, and is used to solve efficiency problems caused by network initialization delays in the production process. Background Art
[0002] The camera module consists of three parts: mainboard, lens, and lens mount (IRCUT).
[0003] Cameras generally use fixed-focus lenses. During production, the camera's focus needs to be adjusted, and image detection for black and white field and color gamut detection requires the camera module to output an image. For a camera, light passes through the lens and strikes the image sensor inside the camera. At this point, the signal is still an analog signal. This signal is converted to a digital signal through A / D conversion, then processed by the ISP or DSP, and then output as a video signal. If the signal undergoes further D / A conversion before output, converting the digital signal to an analog output, this type of camera is generally called an analog camera. Common examples include standard-definition analog cameras like CVBs and high-definition analog cameras like XVI, TVI, CVI, and AHD. Cameras that directly output a digital signal are called digital cameras, such as those using SDI, HDMI, or USB. Finally, to reduce the amount of data transmitted, the digital signal is encoded and compressed according to specific standards (such as H.264, H.265, or H.266) before output. This type of camera is called a network camera. In summary, cameras are categorized as analog, digital, and network cameras. Network cameras are categorized as either wired or wireless. Wired network cameras connect via Ethernet (RJ45), while wireless network cameras can connect via Wi-Fi, Bluetooth, 4G, and 5G. Network cameras transmit image data via Ethernet or wirelessly, but require network protocol stack initialization, IP allocation, and wireless connection. This results in a delay of 15 seconds or more between power-on initialization and image output. This delay, which can be futile during production focusing and image inspection, can severely impact production and inspection efficiency.
[0004] A prior art method for quickly generating images during production focusing and image inspection involves connecting more than a dozen data lines from the image sensor directly to production inspection equipment. This allows the test motherboard on the production inspection equipment to process the image sensor's signals, thereby achieving rapid image output. This method, rather than relying on the network camera module's SoC, has the disadvantage of requiring more than a dozen connecting lines from the camera module to the production inspection equipment. This requires the camera motherboard to have more than a dozen copper contacts around the image sensor for electrical connection. The image sensor's signal is particularly sensitive, easily causing electromagnetic interference and failing EMC testing. Consequently, it is impossible to obtain national certifications such as the China CCC, the EU CE, or the US FCC.
[0005] Both analog cameras and digital cameras can quickly output images. The main control chip of the USB camera converts the raw data of the image sensor into uncompressed YUV or low-compressed MJPEG format, and then manages the USB data transmission digital image signal through the support of the USB protocol. It has the advantages of low latency and no need for network encoding and decoding. The USB camera takes only 1 second from power-on initialization to image output. In the prior art, although the SoC of the network camera is integrated with a USB2.0 interface, it is only used for non-image transmission functions, such as being used as a debugging interface, storage expansion, connecting to USB microphones, sensors or infrared lights, etc., and does not solve the image delay problem in the production process. In user mode, the network camera outputs the network image signal through the Ethernet PHY and does not need a USB2.0 interface to output the digital image signal.
[0006] As mentioned above, network cameras require network protocol stack initialization (such as IP allocation and wireless connectivity), resulting in a delay of over 15 seconds between power-on initialization and image output, severely impacting production inspection efficiency. Existing fast image output solutions require direct connection of the image sensor's dozens of data lines to production inspection equipment, which can easily cause electromagnetic interference (EMI) issues and prevent EMC certifications (such as CCC / CE / FCC). In contrast, USB cameras, which directly output digital signals (such as YUV / MJPEG), have a power-on initialization image output delay of less than 1 second. However, the network camera's USB 2.0 interface is only used for non-image transmission functions (such as debugging and peripheral expansion). Therefore, a solution that is compatible with the network camera hardware architecture, reuses the USB 2.0 interface for fast image output, and meets EMC requirements is urgently needed. Therefore, to address the shortcomings of existing technologies, how to quickly output images after power-on initialization of the network camera module while ensuring that the network camera module passes EMC testing is the key technical solution.
[0007] In addition, common terms in the prior art include: SoC (System on Chip) refers to a highly integrated chip that integrates multiple core camera modules, such as the processor, image processing unit, storage unit, and interfaces, into a single chip, forming a complete system-level solution. The design goals of SoCs are to improve performance, reduce power consumption, and minimize size through integration, particularly for network cameras.
[0008] Ethernet PHY: A physical layer transceiver is a hardware interface chip used for Ethernet communications, responsible for handling signal transmission at the physical layer (Layer 1) of the OSI model. It is a key component in Ethernet communications, connecting the upper-layer Data Link Layer (MAC) with the physical media (such as network cables or optical fibers).
[0009] USB 2.0 (Universal Serial Bus 2.0) is the second-generation serial bus with a theoretical bandwidth of 480 Mbps (megabits per second). The interface consists of four pins: VBUS, D+, D−, and GND. USB 2.0 is a native digital interface that transmits binary data directly over a physical cable, operating as a point-to-point communication interface. The limited bandwidth of USB 2.0 makes it more suitable for real-time transmission of low- to medium-resolution images. The mainstream formats are YUV or MJPEG using the UVC protocol.
[0010] GPIO: General Purpose Input / Output, general input and output. Summary of the Invention
[0011] The core technical problems solved by the present invention include: First, production inspection efficiency is low: due to the initialization of the network protocol stack (such as IP allocation and wireless connection), the delay from power-on initialization to image output of the network camera is ≥15 seconds, which seriously slows down the production line.
[0012] Second, EMC certification barriers: Existing rapid image output solutions require directly connecting more than a dozen data lines of the image sensor to external production and testing equipment, causing electromagnetic interference (EMI) and failing to pass EMC certifications such as CCC / CE / FCC.
[0013] Third, hardware resources are idle: the USB 2.0 interface integrated in the webcam SoC is only used for non-image transmission functions (such as debugging and peripheral expansion), and its potential for low-latency image transmission is not fully utilized.
[0014] The present invention proposes a dual-mode network camera module. By switching between two sets of software programs through GPIO pin level detection, it can switch between user mode and production detection mode on the same hardware platform. The USB 2.0 interface of the SoC is reused to output digital image signals for production detection. This significantly shortens the waiting time from power-on initialization to image output, improves production detection efficiency and thus reduces production costs, and solves network initialization delay and EMC compatibility issues.
[0015] The hardware structure includes: Image sensor; SoC: integrated storage unit, Ethernet PHY, USB 2.0 interface and GPIO detection pins, etc. Detection circuit: The default level of the GPIO detection pin T is preset to the first level through a pull-up or pull-down resistor, and is forced to flip to the second level by the production detection equipment to trigger the production detection mode.
[0016] Furthermore, the software logic is: The storage unit stores two sets of programs: the first software program (user mode) controls the Ethernet PHY to output network image signals, using the USB 2.0 interface as a general peripheral communication interface; the second software program (production test mode) outputs uncompressed / low-compressed digital image signals (such as YUV / MJPEG) through the USB 2.0 interface, skipping the network protocol stack initialization process (such as DHCP, PPPoE, and RTSP service startup).
[0017] Furthermore, the mode switching mechanism is: The SoC detects the level of the GPIO detection pin T within the preset time after power-on: First level → executing the first software program → starting network image output; Second level → executing the second software program → starting USB digital image output.
[0018] Furthermore, production inspection optimization design: The USB 2.0 interface connects only the differential signals D+, D−, and ground (GND) to external production and testing equipment, disconnecting the VBUS power pin to avoid power supply conflicts. The external production and testing equipment complies with the UVC protocol standard and is compatible with common testing software and image analysis tools (such as OpenCV).
[0019] The beneficial effects of the present invention are: First, production efficiency is improved: in production mode, network initialization is skipped, and the time from power-on initialization to image output is shortened from ≧15 seconds to less than 1 second, and the efficiency of focusing and image detection is increased by more than 15 times.
[0020] Second, EMC compatibility: No external image sensor data cable is required. Only four USB wires, D+, D−, GND, and a detection pin T, are required to connect to external production testing equipment, avoiding the image sensor's original data line. This reduces the number of motherboard contacts by more than 80%, enabling the network camera module to pass CCC / CE / FCC certification.
[0021] Third, zero additional hardware cost: fully reuse the existing interfaces of the SoC and utilize GPIO resources, without the need for new hardware, and dual mode can be achieved only through software switching. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the specific embodiments of the present invention, the invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.
[0023] Figure 1 This is a simplified diagram of the hardware architecture of the present invention; Figure 2 This is a flow chart of the dual-mode software switching of the present invention; Figure 3 This is a schematic diagram of the connection scheme of the production detection mode of the present invention.
[0024] The descriptions of the reference numerals in the figures are as follows.
[0025] Image sensor 101, pull-up resistor 102, pull-down resistor 103, SoC 200, storage unit 201, Ethernet PHY 202, USB 2.0 interface 203, GPIO detection pin T 204, power-on initialization 301, detection pin T level determination 302, execution of first software program (user mode) 303, execution of second software program (production detection mode) 304, production detection equipment 400, USB differential signal line D+ 401, USB differential signal line D− 402, ground line (GND) 403, USB Type-A interface (404), I / O control terminal (405). DETAILED DESCRIPTION
[0026] The following will be combined with the Figure 1-3 The technical solutions of the present invention are clearly and completely described. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present invention.
[0027] Hardware architecture implementation ( Figure 1 ): Image sensor (101): A CMOS image sensor (such as Sony IMX series) is used to output raw Bayer format image data to the ISP processing unit of the SoC (200).
[0028] The SoC (200) integrates the following modules: Storage unit (201): stores two sets of software programs, a first software program and a second software program.
[0029] Ethernet PHY (202): supports 10 / 100Mbps Ethernet communication for network video streaming output (RTSP / H.264) in user mode.
[0030] USB 2.0 interface (203): Contains four pins: VBUS, D+ (401), D− (402), and GND (403). In user mode, it is configured as a UART debugging interface or a peripheral expansion port (such as connecting a USB temperature and humidity sensor). In production detection mode, it is configured as a UVC (USB Video Class) device, outputting a YUV422 uncompressed video stream.
[0031] GPIO detection pin T (204): specifies an unused GPIO pin GPIO12 of the SoC as mode switching detection.
[0032] Detection circuit: Two optional embodiments are provided.
[0033] Example 1: Default pull-up resistor (102) configuration, GPIO detection pin T (204) is connected to a 3.3V power supply (default high level = first level) through a 10kΩ pull-up resistor (102); an external production detection device (400) forcibly pulls the GPIO detection pin T (204) down to 0V (low level = second level) through a probe, triggering a production detection mode.
[0034] Example 2: Default pull-down resistor (103) configuration, GPIO detection pin T (204) is grounded via a 10 kΩ pull-down resistor (103) (default low level = first level); external production detection equipment (400) forcibly pulls up the GPIO detection pin T (204) to +V (high level = second level) via a probe, triggering the production detection mode.
[0035] In one embodiment, the PCB mainboard of the network camera module reserves four detection contacts, namely, GPIO detection pin T (204), D+ (401), D− (402), and GND (403). The impedance of the USB differential signal D+ (401) and D− (402) is controlled at 90Ω±10% to avoid wiring parallel to the sensor data line.
[0036] In one embodiment, in the production detection mode, the USB 2.0 interface (203) only connects D+ (401), D− (402), and GND (403) to the production detection device (400), and VBUS is left floating to prevent the production detection device (400) from being reversely powered.
[0037] In one embodiment, the network camera module adopts the UVC 1.5 protocol and outputs an uncompressed YUV422 format with a resolution of 1280×720@30fps. The data bandwidth is: 720×1280×16bit×30fps≈442Mbps, which is lower than the USB 2.0 theoretical bandwidth of 480Mbps. The production inspection device (400) acts as a USB host to receive the uncompressed YUV422 image data (resolution 1280×720@30fps).
[0038] In one embodiment, the GPIO detection pin T (204) is connected to the IO control pin of the production detection equipment (400). A resistor of 22Ω is connected in series between the control terminals (405) to suppress plug-in surge current.
[0039] Dual-mode software switching process ( Figure 2 ): Power-on initialization (301): After executing the BootLoader, the SoC (200) loads the program jump instruction in the storage unit (201). The SoC (200) detects the level of the GPIO detection pin T (204) within 500ms after power-on, and executes the first software program by default if the level exceeds the timeout. Level jitter protection: When the level of the GPIO detection pin T (204) changes within the window period of 500ms, the last stable level (lasting >10ms) is used as the standard. The level detection window period is completed within 500ms after power-on to ensure that the delay in drawing in production mode is less than 1 second.
[0040] Detection pin T level judgment (302): User mode path: If the GPIO detection pin T (204) is at a first level (high level for pull-up type / low level for pull-down type), a first software program (303) is started, a network protocol stack (including a DHCP client and an RTSP service) is initialized, and the USB2.0 interface (203) is configured as a CDC / ACM class device (non-image transmission function).
[0041] Production detection mode path: If the GPIO detection pin T (204) is at the second level (low level for pull-up type / high level for pull-down type), start the second software program (304), skip the network protocol stack initialization (disable DHCP / PPPoE module), configure the USB 2.0 interface (203) as a UVC device, and directly output the digital image signal (processed into YUV422 format by ISP).
[0042] Core code snippet example: ```c / / Mode switching judgment (BootLoader stage) void boot_mode_select() { gpio_init(TEST_PIN); / / Initialize test pin T (GPIO12) if (gpio_read(TEST_PIN) == PRODUCTION_LEVEL) { / / Detect the second level jump_to_address(SECOND_FIRMWARE_ADDR); / / Jump to the second software program entry } else { jump_to_address(FIRST_FIRMWARE_ADDR); / / Jump to the first software program entry } } / / Second software program (production mode) key initialization void production_mode_init() { bypass_network_init(); / / Skip network protocol stack initialization usb_uvc_init(); / / Initialize USB as UVC device (do not enable network protocol stack) sensor_output_yuv(); / / Configure the image sensor to output uncompressed YUV422 data / / Omit network protocol related initialization code (DHCP / RTSP) } / / First software program (user mode) key initialization void user_mode_init() { init_network_stack(); / / Initialize the TCP / IP protocol stack start_rtsp_stream(); / / Output H.264 stream via Ethernet PHY usb_configure_as_hid(); / / Configure USB as HID interface (to connect infrared sensor) } Production test mode connection scheme ( Figure 3 ) The USB differential signal lines D+ (401), D− (402), and the ground line GND (403) are connected to the USB Type-A interface (404) of the production detection device (400); VBUS is not connected to the production detection device (400) to avoid power supply conflicts with the production detection device (400); the GPIO detection pin T (204) is connected to the I / O control terminal (405) of the production detection device (400) through a single wire, and the production detection device (400) is forced to output a second level.
[0043] Obviously, the above embodiments are merely examples for clarity of explanation and are not intended to limit the implementation methods. Those skilled in the art will readily appreciate that other variations or modifications based on the above descriptions are possible. It is not necessary and impossible to enumerate all implementation methods here. Obvious variations or modifications arising therefrom remain within the scope of protection of the present invention.
Claims
1. A network camera module that outputs digital image signals for production inspection, characterized in that: Two software programs are stored in the same hardware, reusing the SoC's USB 2.0 interface, including: Image sensor; System-on-chip (SoC), including a storage unit, Ethernet PHY, USB2.0 interface and at least one GPIO pin; The storage unit stores a first software program and a second software program; The first software program is configured to output a network image signal through the Ethernet PHY in user mode and control the USB 2.0 interface as a universal peripheral communication interface; The second software program is configured to output an uncompressed or low-compression digital image signal through the USB 2.0 interface in a production detection mode and skip a network protocol stack initialization process; The detection circuit is connected to the GPIO pin as a detection pin T, and is used to detect its level state during power-on initialization.
2. The network camera module for outputting digital image signals for production inspection according to claim 1, characterized in that: The GPIO detection pin T is connected to an external production detection device; the level state of the GPIO detection pin T is forcibly changed by the external production detection device to trigger a production detection mode. The SoC detects the level state of the GPIO detection pin T within a preset time after power-on initialization, and executes a second software program if a second level is detected; Otherwise, the first software program is executed.
3. The network camera module for outputting digital image signals for production inspection according to claim 2, characterized in that: The detection circuit includes a pull-up resistor connected between the GPIO detection pin T and a power supply; the high level of the GPIO detection pin T is a first level, and the low level is a second level.
4. The network camera module for outputting digital image signals for production inspection according to claim 2, characterized in that: The detection circuit includes a pull-down resistor connected between the GPIO detection pin T and the ground; the low level of the GPIO detection pin T is a first level, and the high level is a second level.
5. The network camera module for outputting digital image signals for production inspection according to claim 1, characterized in that: The USB 2.0 interface's differential signal pins (D+ / D−) and ground line (GND) are connected to external production testing equipment for transmitting digital image signals and test instructions. The USB 2.0 interface's power pin (VBUS) is not connected to the external production testing equipment. The USB interface on the external production testing equipment complies with the UVC protocol and is compatible with common testing software and image analysis tools.