WO2021017396A1 - 投影仪振镜测试单元图像的提取方法、装置及电子设备 - Google Patents
投影仪振镜测试单元图像的提取方法、装置及电子设备 Download PDFInfo
- Publication number
- WO2021017396A1 WO2021017396A1 PCT/CN2019/129224 CN2019129224W WO2021017396A1 WO 2021017396 A1 WO2021017396 A1 WO 2021017396A1 CN 2019129224 W CN2019129224 W CN 2019129224W WO 2021017396 A1 WO2021017396 A1 WO 2021017396A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- preset
- test unit
- roi image
- pixels
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/20—Image preprocessing
- G06V10/25—Determination of region of interest [ROI] or a volume of interest [VOI]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N9/00—Details of colour television systems
- H04N9/12—Picture reproducers
- H04N9/31—Projection devices for colour picture display, e.g. using electronic spatial light modulators [ESLM]
- H04N9/3191—Testing thereof
Definitions
- the present invention relates to the technical field of image processing, and more specifically, to a method for extracting images of a projector galvanometer test unit, a device for extracting images of a projector galvanometer test unit, an electronic device, and a computer readable storage medium.
- the vibration of its galvanometer needs to be tested when it leaves the factory.
- the vibration of the galvanometer of the DLP projector is judged by the human eye, which is highly subjective, low in accuracy, and easy to cause fatigue and low efficiency.
- an industrial camera can be used to capture the image of the vibrating mirror and extract a unit vibration image from the image. Judge the vibration of the galvanometer based on the vibration image of the unit. The difficulty of this automatic test is to extract a unit vibration image.
- An object of the present invention is to provide a new technical solution for extracting images of a vibration test unit of a projector.
- a method for extracting images of a galvanometer test unit of a projector including:
- the projected image includes multiple groups of uniformly arranged test unit images, wherein the test unit images include at least one set of monochromatic test patterns, and the set of monochromatic test patterns includes at least Four test patterns evenly arranged in a clockwise or counterclockwise direction, and the single color is any one of red, green, and blue;
- a group of test unit images is extracted from the processed ROI image.
- obtaining the number of groups of test unit images of the same group includes:
- the number of groups of single-color test patterns is determined.
- the counting the number of all monochromatic test patterns in the same group of test unit images in the processed ROI image includes:
- the number of the connected domains is counted as the number of the single-color test patterns.
- the method further includes:
- the connected domains in which the number of pixels with the gray value of 255 exceeds a preset number are obtained by screening
- the number of pixels with the gray value of 255 exceeding the preset number of connected domains is counted as the number of the single-color test patterns.
- the extracting a group of test unit images from the processed ROI image by using the group number includes:
- a set of test unit images are extracted from the processed ROI image.
- the color of the preset monochromatic channel is the same as the display color of the monochromatic test pattern
- the display colors of the multiple sets of monochromatic test patterns are different, and the color of the preset monochromatic channel is the same as that of any set of monochromatic test patterns.
- the colors are the same.
- the method before counting the number of pixels in each row and each column of the ROI image whose brightness value of the preset monochrome channel exceeds a preset brightness threshold in the order from top to bottom and from left to right, the method also includes:
- the brightness value of the preset monochrome channel exceeds the preset brightness threshold
- the brightness value of the red channel exceeds the preset red brightness threshold
- the brightness value of the green channel exceeds the preset green brightness threshold
- the brightness value of the blue channel is removed. Pixels whose brightness value exceeds the preset blue brightness threshold.
- a device for extracting images from a galvanometer test unit of a projector including:
- the acquisition module is used to acquire a projection image collected by an industrial camera, wherein the projection image includes multiple groups of uniformly arranged test unit images, wherein the test unit images include at least one set of monochromatic test patterns, and the set of single
- the color test pattern includes at least four test patterns evenly arranged in a clockwise or counterclockwise direction, and the single color is any one of red, green, and blue;
- the interception module is used to intercept the ROI image of the region of interest from the projection image
- a screening module configured to obtain the brightness value of the preset monochrome channel of each pixel in the ROI image, and filter to obtain pixels whose brightness value of the preset monochrome channel exceeds a preset brightness threshold;
- a statistics module configured to count the number of pixels in each row and each column of the ROI image whose brightness value of the preset monochrome channel exceeds a preset brightness threshold in the order from top to bottom and from left to right;
- the position information determination module is used to obtain the first position information of the row of pixels with the number of 0 in the first row, and the second position information of the row of pixels with the number of 0 in the last row, the first column The third position information where the pixel points of the column with the number of 0 are located, and the fourth position information where the pixel points of the column with the number of 0 are located in the last column;
- the first removal module is configured to remove an incomplete test unit image from the ROI image according to the first location information, the second location information, the third location information, and the fourth location information to obtain The processed ROI image;
- the group number information determining module is configured to obtain the group number of test unit images with the same color as the preset monochrome channel based on the processed ROI image;
- the extraction module is used to extract a group of test unit images from the processed ROI image by using the group number.
- an electronic device including: a memory and a processor, the memory is used to store instructions, the instructions are used to control the processor to operate to perform any of the The method described in one item.
- a computer-readable storage medium having a computer program stored thereon, and the computer program, when executed by a processor, implements the method according to any one of the first aspects.
- the method for extracting the image of the test unit of the projector galvanometer provided by the embodiment of the present invention realizes the automatic extraction of the image of the test unit and improves the accuracy of the extraction work.
- FIG. 1 is a block diagram of the hardware configuration of an electronic device that can be used to implement a method for extracting an image of a galvanometer test unit of a projector according to any embodiment of the present invention.
- Fig. 2 is a processing flowchart of a method for extracting an image of a galvanometer test unit of a projector according to an embodiment of the present invention.
- Fig. 3 shows a schematic diagram of an image projected by a projector.
- Fig. 4 is a schematic diagram of an ROI image according to this example.
- Fig. 5 shows a schematic diagram of the binarized image of this example.
- Figure 6 shows a schematic diagram of a group of test unit images of this example.
- Fig. 7 is a schematic block diagram of an image extraction device for a galvanometer test unit of a projector according to an embodiment of the present invention.
- Fig. 8 is a functional block diagram of an electronic device according to an embodiment of the present invention.
- FIG. 1 is a block diagram of the hardware configuration of an electronic device that can be used to implement a method for extracting an image of a galvanometer test unit of a projector according to any embodiment of the present invention.
- the electronic device 1000 may be an electronic device such as a mobile phone, a portable computer, a tablet computer, and a palmtop computer.
- the electronic device 1000 may include a processor 1100, a memory 1200, an interface device 1300, a communication device 1400, a display device 1500, an input device 1600, a speaker 1700, a microphone 1800, and so on.
- the processor 1100 may be a central processing unit (CPU), a microprocessor MCU, or the like.
- the memory 1200 includes, for example, ROM (Read Only Memory), RAM (Random Access Memory), non-volatile memory such as a hard disk, and the like.
- the interface device 1300 includes, for example, a USB interface, a headphone interface, and the like.
- the communication device 1400 can perform wired or wireless communication, for example.
- the display device 1500 is, for example, a liquid crystal display, a touch display, or the like.
- the input device 1600 may include, for example, a touch screen, a keyboard, and the like. The user can input/output voice information through the speaker 1700 and the microphone 1800.
- the present invention may only involve some of the devices.
- the electronic device 1000 only involves the memory 1200 and the processor 1100.
- the memory 1200 of the electronic device 1000 is used to store instructions, and the instructions are used to control the processor 1100 to execute the method for extracting images of the galvanometer test unit of the projector provided by the embodiment of the present invention .
- Fig. 2 is a processing flowchart of a method for extracting an image of a galvanometer test unit of a projector according to an embodiment of the present invention.
- the image extraction method of the projector galvanometer test unit is implemented by electronic equipment.
- the method for extracting the image of the galvanometer test unit of the projector may include the following steps S2100-S2800.
- Step S2100 Obtain a projection image collected by the industrial camera, where the projection image includes multiple sets of uniformly arranged test unit images, wherein the test unit images include at least one set of monochromatic test patterns, and one set of monochromatic test patterns includes at least four edge
- the test patterns are arranged evenly in a clockwise or counterclockwise direction, and the single color is any of red, green, and blue.
- Fig. 3 shows a schematic diagram of an image projected by a projector.
- the projector projects an image on the projection screen ABCD, the projected image area is A1B1C1D1, and the projector lens is parallel to the plane where the projection screen is located.
- the industrial camera is installed in the tooling and jig, and is used to shoot the image projected by the projector onto the projection screen.
- the optical axis of the optical components of the industrial camera is perpendicular to the plane where the projection screen is located.
- the electronic equipment is used to control the industrial camera to take pictures and obtain the projected images collected by the industrial camera for processing.
- the electronic device is also used to control the galvanometer of the projector to turn on the fixed vibration mode.
- step S2200 the ROI image of the region of interest is intercepted from the projection image.
- the ROI (Region of Interest) image may be a square image at any position intercepted from the projected image, for example, an image located in the middle of the projected image.
- the ROI image includes at least a set of complete test unit images.
- Step S2300 Obtain the brightness value of the preset monochrome channel of each pixel in the ROI image, and filter to obtain pixels whose brightness value of the preset monochrome channel exceeds a preset brightness threshold.
- the color of the preset monochromatic channel is the same as the display color of the set of monochromatic test patterns.
- the display colors of the multiple sets of monochromatic test patterns are different, and the color of the preset monochromatic channel can be the same as any set of monochromatic test patterns.
- the color of each pixel in the image is composed of the three monochromatic lights of red, green, and blue mixed in different proportions. Red, green, and blue are also called the three primary colors, which are represented in English as R (red), G (green), and B (blue). RGB each has 256 levels of brightness, which are represented by numbers from 0, 1, 2...254, 255.
- Step S2400 in the order from top to bottom and from left to right, respectively count the number of pixels in each row and each column of the ROI image whose brightness value of the preset monochrome channel exceeds the preset brightness threshold.
- the specific value of the preset brightness threshold can be determined according to the actual test situation, for example, it can be set to 50.
- Step S2500 Obtain the first position information where the pixel points in the first row with a number of 0 are located, the second position information where the pixels in the last row with a number of 0 are located, and the first column where the pixel points in the first column with a number of 0 are located.
- the number of pixels with the brightness value of a row of the preset monochrome channel exceeding the preset brightness threshold is 0, which can indicate that the row of pixels does not exist in the monochrome test pattern with the same color as the preset monochrome channel Of pixels.
- the number of pixels whose brightness value of a certain column of the preset monochrome channel exceeds the preset brightness threshold is 0, which can indicate that the column of pixels does not exist in the monochrome test pattern with the same color as the preset monochrome channel Of pixels.
- Step S2600 according to the first location information, the second location information, the third location information, and the fourth location information, remove the incomplete test unit image from the ROI image to obtain a processed ROI image.
- Step S2700 based on the processed ROI image, obtain the group number of test unit images with the same color as the preset monochrome channel.
- Step S2700 may further include steps S2710-S2720.
- Step S2710 Count the number of all monochrome test patterns in the test unit image with the same color as the preset monochrome channel in the processed ROI image.
- Step S2710 specifically includes the following steps.
- Step S2711 Set the gray value of the pixel whose brightness value of the preset monochrome channel exceeds the preset brightness threshold value to 255 to obtain a binary image.
- Step S2712 traverse each pixel in the binarized image, and perform connection processing on the pixel with a gray value of 255 to obtain at least one connected domain.
- Step S2713 Count the number of connected domains as the number of single-color test patterns.
- steps S2714-S2715 are also executed before step S2713 is executed.
- Step S2714 Count the number of pixels with a gray value of 255 in each connected domain.
- step S2715 the connected domains in which the number of pixels with a gray value of 255 exceeds a preset number are obtained by screening.
- step S2713 further includes: counting the number of pixels whose gray value is 255 exceeds the preset number of connected domains as the number of monochromatic test patterns.
- step S2720 the number of groups of single-color test patterns is determined according to the number of all single-color test patterns and the number of each group of single-color test patterns.
- Step S2800 using the number of groups, extract a group of test unit images from the processed ROI image.
- Step S2800 further includes the following steps S2810-S2840.
- Step S2810 Obtain the size information of the processed ROI image.
- Step S2820 Determine the arrangement information of the number of groups according to the size information of the ROI image.
- the ROI image is a square image, and the number of groups of monochromatic test patterns is 9, then the arrangement information of the 9 groups of monochromatic test patterns is 3 rows and 3 columns.
- the ROI image is a rectangular image, and the number of groups of the monochromatic test pattern is 8. Then, there are 4 groups arranged along the long side of the ROI image, along the short side of the ROI image There are 2 groups arranged in the direction.
- Step S2830 Determine the size information of a group of test unit images according to the size information of the processed ROI image and the arrangement information of the group number.
- Step S2840 based on the size information of a group of test unit images, extract a group of test unit images from the processed ROI image.
- a group of test unit images are extracted from the processed ROI image.
- the method for extracting the image of the projector galvanometer test unit further includes step S2900, removing pixels from which the brightness value of the preset monochrome channel exceeds the preset brightness threshold.
- the brightness value of the red channel exceeds the preset red brightness threshold
- the brightness value of the green channel exceeds the preset green brightness threshold
- the brightness value of the blue channel exceeds the preset blue brightness threshold. This can eliminate the interference of white pixels.
- the preset red brightness threshold, the preset green brightness threshold and the preset blue brightness threshold can be determined according to the test situation.
- the preset red brightness threshold, the preset green brightness threshold and the preset blue brightness threshold are all set to 50 .
- a set of test unit images are respectively extracted, and the image of the projector galvanometer is determined based on the two sets of test unit images. Whether the vibration is working properly.
- the method for extracting the image of the test unit of the projector galvanometer provided by the embodiment of the present invention realizes the automatic extraction of the image of the test unit and improves the accuracy of the extraction work.
- the method for extracting the image of the galvanometer test unit of the projector may include the following steps S301-S318.
- Step S301 Obtain a projection image collected by an industrial camera.
- Step S302 intercept the ROI image of the region of interest from the projection image.
- Fig. 4 is a schematic diagram of an ROI image according to this example.
- the ROI image includes multiple sets of uniformly arranged test unit images.
- the test unit image includes three sets of single-color test patterns.
- the three sets of monochromatic test patterns have different colors.
- the outermost set of monochromatic test patterns are displayed in green, the middle set of monochrome test patterns are displayed in red, and the innermost set of monochrome test patterns are displayed in green. .
- Each group of single-color test patterns includes four test patterns evenly arranged in a counterclockwise direction. Among them, in each group of monochromatic test patterns, two test patterns are arranged horizontally and two test patterns are arranged vertically.
- the test unit image includes a plurality of white dots in addition to three sets of monochromatic test patterns.
- Step S303 Obtain the brightness value of the preset green channel of each pixel in the ROI image, and filter to obtain pixels whose brightness value of the preset green channel exceeds a preset brightness threshold.
- the preset brightness threshold can be set to 50.
- the color of the preset monochromatic channel is green, and can also be red or blue.
- step S304 from the pixels where the brightness value of the preset green channel exceeds the preset brightness threshold, remove the brightness value of the red channel exceeding the preset red brightness threshold, the brightness value of the green channel exceeding the preset green brightness threshold and the pixels of the blue channel. Pixels whose brightness values exceed the preset blue brightness threshold are obtained as pixels whose brightness values of the remaining preset green channels exceed the preset brightness threshold. This can eliminate the interference of white pixels.
- the preset red brightness threshold, the preset green brightness threshold, and the preset blue brightness threshold are all set to 50.
- step S305 in the order from top to bottom and from left to right, from the ROI image, respectively count the number of pixels whose brightness values of the remaining preset monochrome channels in each row and each column exceed the preset brightness threshold.
- Step S306 Obtain the first position information where the pixel points of the first row number 0 are located, the second position information where the pixels of the last row number 0 are located, and the first column number 0 pixels are located. The third position information of the position, and the fourth position information of the pixel in the last column whose number is 0.
- the number of pixels in a row whose brightness value of the remaining preset green channel exceeds the preset brightness threshold is 0, which can indicate that the row of pixels does not have the same color as the preset green channel in the monochrome test pattern pixel.
- the number of pixels in a column whose brightness value of the remaining preset green channel exceeds the preset brightness threshold is 0, which can indicate that the column of pixels does not have the same color as the preset green channel in the monochrome test pattern pixel.
- Step S307 According to the first position information, the second position information, the third position information, and the fourth position information, the incomplete test unit image is removed from the ROI image to obtain a processed ROI image.
- Step S308 Set the gray value of the pixel whose brightness value of the remaining preset green channel exceeds the preset brightness threshold to 255, and set the gray value of the pixel whose brightness value of the preset green channel does not exceed the preset brightness threshold. If it is 0, a binary image is obtained.
- Fig. 5 shows a schematic diagram of the binarized image of this example.
- step S309 each pixel in the binarized image is traversed, and the pixel with a gray value of 255 is connected to obtain at least one connected domain.
- Step S310 Count the number of pixels with a gray value of 255 in each connected domain.
- step S312 the connected domains in which the number of pixels with a gray value of 255 exceeds a preset number are obtained by screening.
- step S313 the number of pixels with a grayscale value of 255 exceeding the preset number of connected domains is counted as the number of monochromatic test patterns. This can eliminate the effect of noise.
- Step S314 Determine the number of groups of single-color test patterns according to the number of all single-color test patterns and the number of each group of single-color test patterns.
- Step S315 Obtain size information of the binarized image.
- Step S316 Determine the arrangement information of the number of groups according to the size information of the binarized image.
- the binarized image is a rectangular image.
- the number of groups of the monochromatic test pattern is 12, so there are 4 groups arranged along the long side of the ROI image. There are 3 groups arranged along the short side of the ROI image.
- Step S317 Determine the size information of a group of test unit images according to the size information of the binarized image and the arrangement information of the group number.
- Figure 6 shows a schematic diagram of a group of test unit images of this example.
- Fig. 7 is a schematic block diagram of an image extraction device for a galvanometer test unit of a projector according to an embodiment of the present invention.
- the apparatus 7000 for extracting the image of the galvanometer test unit of the projector of this embodiment may include an acquisition module 7100, an interception module 7200, a screening module 7300, a statistics module 7400, a position information determination module 7500, and a first removal module 7600 , Group number information determination module 7700, extraction module 7800.
- the acquisition module 7100 is used to acquire a projection image collected by an industrial camera, where the projection image includes multiple groups of uniformly arranged test unit images, wherein the test unit images include at least one set of monochromatic test patterns, and one set of monochromatic test patterns includes at least four A test pattern evenly arranged in a clockwise or counterclockwise direction, and the single color is any of red, green, and blue.
- the interception module 7200 is used to intercept the ROI image of the region of interest from the projection image.
- the screening module 7300 is used to obtain the brightness value of the preset monochrome channel of each pixel in the ROI image, and filter to obtain pixels whose brightness value of the preset monochrome channel exceeds the preset brightness threshold.
- the statistics module 7400 is configured to count the number of pixels whose brightness value of the preset monochrome channel exceeds the preset brightness threshold in each row and each column of the ROI image in the order from top to bottom and from left to right.
- the position information determining module 7500 is used to obtain the first position information where the pixel points of the first row with 0 number are located, the second position information where the pixels of the last row number 0 are located, and the first column whose number is 0 The third position information where the pixel points of the column are located, and the fourth position information where the pixel points of the last column whose number is 0 are located.
- the first removal module 7600 is configured to remove the incomplete test unit image from the ROI image according to the first location information, the second location information, the third location information, and the fourth location information to obtain a processed ROI image.
- the group number information determining module 7700 is configured to obtain the group number of test unit images with the same color as the preset monochrome channel based on the processed ROI image.
- the extraction module 7800 is used to extract a group of test unit images from the processed ROI image using the number of groups.
- the color of the preset monochromatic channel is the same as the display color of the monochromatic test pattern; the test unit image includes multiple sets of monochromatic test patterns.
- the display colors of multiple sets of monochrome test patterns are different, and the color of the preset monochrome channel is the same as the display color of any set of monochrome test patterns.
- the group number information determining module 7700 is also used for a statistical unit and a group number information determining unit.
- the statistical unit is used to count the number of all monochromatic test patterns in the test unit image with the same color as the preset monochromatic channel in the processed ROI image.
- the group number information determining unit is used for determining the group number of the single-color test patterns according to the number of all the single-color test patterns and the number of each group of the single-color test patterns.
- the statistical unit is further used to set the gray value of pixels whose brightness value of the preset monochrome channel exceeds the preset brightness threshold to 255 to obtain a binarized image; traverse each pixel in the binarized image, and set the gray value Perform connectivity processing for 255 pixels to obtain at least one connected domain; count the number of connected domains as the number of monochrome test patterns.
- the group number information determining module 7700 further includes a screening unit.
- the screening unit is used to count the number of pixels with a gray value of 255 in each connected domain; to filter the connected domains where the number of pixels with a gray value of 255 exceeds a preset number;
- the statistical unit is further configured to count the number of pixels with a gray value of 255 exceeding the preset number of connected domains as the number of monochromatic test patterns.
- the extraction module 7800 is further used to obtain the size information of the processed ROI image; determine the arrangement information of the number of groups according to the size information of the ROI image; according to the size information of the processed ROI image and the arrangement of the number of groups Distribution information, determine the size information of a group of test unit images; based on the size information of a group of test unit images, extract a group of test unit images from the processed ROI image.
- the device for extracting images of the galvanometer test unit of the projector further includes a second removing module.
- the second removal module is used to remove the brightness value of the red channel exceeding the preset red brightness threshold, and the brightness value of the green channel exceeding the preset green brightness threshold from the pixels where the brightness value of the preset monochrome channel exceeds the preset brightness threshold. And the pixel whose brightness value of the blue channel exceeds the preset blue brightness threshold.
- the electronic device 1000 may include an image extraction device 7000 for a projector galvanometer test unit according to any embodiment of the present invention, which is used to implement the projector galvanometer test of any embodiment of the present invention. Extraction method of unit image.
- the electronic device 1000 may include a processor 1100 and a memory 1200.
- the memory 1200 is configured to store executable instructions
- the processor 1100 is configured to operate the electronic device 1000 according to the control of the instructions to execute the method for extracting the image of the projector galvanometer test unit according to any embodiment of the present invention.
- a computer-readable storage medium is also provided, and a computer program is stored thereon.
- the computer program when executed by a processor, implements the method for extracting an image of a projector galvanometer test unit as in any embodiment of the present invention.
- the present invention may be a system, a method and/or a computer program product.
- the computer program product may include a computer-readable storage medium loaded with computer-readable program instructions for enabling a processor to implement various aspects of the present invention.
- the computer-readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device.
- the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) Or flash memory), static random access memory (SRAM), portable compact disk read-only memory (CD-ROM), digital versatile disk (DVD), memory stick, floppy disk, mechanical encoding device, such as a printer with instructions stored thereon
- RAM random access memory
- ROM read-only memory
- EPROM erasable programmable read-only memory
- flash memory flash memory
- SRAM static random access memory
- CD-ROM compact disk read-only memory
- DVD digital versatile disk
- memory stick floppy disk
- mechanical encoding device such as a printer with instructions stored thereon
- the computer-readable storage medium used here is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (for example, light pulses through fiber optic cables), or through wires Transmission of electrical signals.
- the computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to various computing/processing devices, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
- the network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
- the network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network, and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing/processing device .
- the computer program instructions used to perform the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more programming languages.
- Source code or object code written in any combination, the programming language includes object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" language or similar programming languages.
- Computer-readable program instructions can be executed entirely on the user's computer, partly on the user's computer, executed as a stand-alone software package, partly on the user's computer and partly executed on a remote computer, or entirely on the remote computer or server carried out.
- the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to access the Internet connection).
- LAN local area network
- WAN wide area network
- an electronic circuit such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), can be customized by using the status information of the computer-readable program instructions.
- the computer-readable program instructions are executed to implement various aspects of the present invention.
- These computer-readable program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing device , A device that implements the functions/actions specified in one or more blocks in the flowchart and/or block diagram is produced. It is also possible to store these computer-readable program instructions in a computer-readable storage medium. These instructions make computers, programmable data processing apparatuses, and/or other devices work in a specific manner, so that the computer-readable medium storing instructions includes An article of manufacture, which includes instructions for implementing various aspects of the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- each block in the flowchart or block diagram may represent a module, program segment, or part of an instruction, and the module, program segment, or part of an instruction contains one or more functions for implementing the specified logical function.
- Executable instructions may also occur in a different order from the order marked in the drawings. For example, two consecutive blocks can actually be executed in parallel, or they can sometimes be executed in the reverse order, depending on the functions involved.
- each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or actions Or it can be realized by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Signal Processing (AREA)
- Controls And Circuits For Display Device (AREA)
- Image Processing (AREA)
Abstract
本发明公开了一种投影仪振镜测试单元图像的提取方法、装置及电子设备,该方法包括:获取工业相机采集的投影图像;从投影图像中截取感兴趣区域ROI图像;基于ROI图像中各像素点的预设单色通道的亮度值和预设亮度阈值,从ROI图像中去除不完整测试单元图像,得到处理后的ROI图像;基于处理后的ROI图像,获得与预设单色通道颜色相同的测试单元图像的组数;利用组数,从处理后的ROI图像中提取一组测试单元图像。
Description
本发明涉及图像处理技术领域,更具体地,涉及一种投影仪振镜测试单元图像的提取方法、一种投影仪振镜测试单元图像的提取装置、一种电子设备以及一种计算机可读存储介质。
投影仪作为无屏电视已经进入普通家庭的生活中,随着网速的不断提升和发展,人们对电视画面的清晰度不断提出新的要求,720p,1080p,4K,这些都成为选择电视的新标准。随着电视画面清晰度的上升,投影仪硬件成本成倍增加,这样振镜(XPR-tilt glass)技术应运而生,可以使用XPR-tilt glass+1080p投影仪的硬件配置,输出4K的画质。
对于此类DLP(Digital Light Processing,数字光处理技术)投影仪,在出厂时,需对其振镜的振动情况进行测试。目前,DLP投影仪振镜振动情况是利用人眼来判断的,主观性强,准确性低,且易导致人疲劳,效率低下。
为实现DLP投影仪振动情况的自动测试,可使用工业相机拍摄振镜振动时的图像,从该图像中提取一个单元振动图像。基于该单元振动图像判断振镜的振动情况。该自动测试的难点在于提取一个单元振动图像。
发明内容
本发明的一个目的是提供一种用于提取投影仪振动测试单元图像的新技术方案。
根据本发明的第一方面,提供了一种投影仪振镜测试单元图像的提取方法,包括:
获取工业相机采集的投影图像,其中,所述投影图像包括多组均匀排 列的测试单元图像,其中,所述测试单元图像至少包括一组单色测试图案,所述一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,所述单色为红、绿、蓝中任一种;
从所述投影图像中截取感兴趣区域ROI图像;
获取所述ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点;
按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量;
获得第一行所述数量为0的行像素点所处的第一位置信息,最后一行所述数量为0的行像素点所处的第二位置信息,第一列所述数量为0的列像素点所处的第三位置信息,以及最后一列所述数量为0的列像素点所处的第四位置信息;
根据所述第一位置信息、所述第二位置信息、所述第三位置信息和所述第四位置信息,从所述ROI图像中去除不完整测试单元图像,得到处理后的ROI图像;
基于所述处理后的ROI图像,获得与所述预设单色通道颜色相同的测试单元图像的组数;
利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像。
可选地,所述基于所述处理后的ROI图像,获得同一类组测试单元图像的组数包括:
统计所述处理后的ROI图像中、与所述预设单色通道颜色相同的测试单元图像中所有单色测试图案的数量;
根据所述所有单色测试图案的数量和每组单色测试图案的数量,确定单色测试图案的组数。
可选地,所述统计所述处理后的ROI图像中同一类组测试单元图像中所有单色测试图案的数量包括:
将所述预设单色通道的亮度值超过预设亮度阈值的像素点的灰度值设为255,得到二值化图像;
遍历所述二值化图像中各像素点,将灰度值为255的像素点进行连通 处理,得到至少一个连通域;
统计所述连通域的数量,以作为所述单色测试图案的数量。
可选地,所述方法还包括:
统计所述各连通域中灰度值为255的像素点的数量;
筛选得到所述灰度值为255的像素点的数量超过预设数量的连通域;
统计所述灰度值为255的像素点的数量超过预设数量的连通域的数量,以作为所述单色测试图案的数量。
可选地,所述利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像包括:
获取所述处理后的ROI图像的尺寸信息;
根据所述ROI图像的尺寸信息确定所述组数的排布信息;
根据所述处理后的ROI图像的尺寸信息和所述组数的排布信息,确定所述一组测试单元图像的尺寸信息;
基于所述一组测试单元图像的尺寸信息,从所述处理后的ROI图像中提取一组测试单元图像。
可选地,在所述测试单元图像包括一组单色测试图案的情况下,所述预设单色通道的颜色与所述单色测试图案的显示颜色相同;
在所述测试单元图像包括多组单色测试图案的情况下,所述多组单色测试图案的显示颜色不同,且所述预设单色通道的颜色与任一组单色测试图案的显示颜色相同。
可选地,在按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量之前,所述方法还包括:
从所述预设单色通道的亮度值超过预设亮度阈值的像素点中,去除红色通道的亮度值超过预设红色亮度阈值、绿色通道的亮度值超过预设绿色亮度阈值且蓝色通道的亮度值超过预设蓝色亮度阈值的像素点。
根据本发明的第二方面,提供了一种投影仪振镜测试单元图像的提取装置,包括:
获取模块,用于获取工业相机采集的投影图像,其中,所述投影图像 包括多组均匀排列的测试单元图像,其中,所述测试单元图像至少包括一组单色测试图案,所述一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,所述单色为红、绿、蓝中任一种;
截取模块,用于从所述投影图像中截取感兴趣区域ROI图像;
筛选模块,用于获取所述ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点;
统计模块,用于按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量;
位置信息确定模块,用于获得第一行所述数量为0的行像素点所处的第一位置信息,最后一行所述数量为0的行像素点所处的第二位置信息,第一列所述数量为0的列像素点所处的第三位置信息,以及最后一列所述数量为0的列像素点所处的第四位置信息;
第一去除模块,用于根据所述第一位置信息、所述第二位置信息、所述第三位置信息和所述第四位置信息,从所述ROI图像中去除不完整测试单元图像,得到处理后的ROI图像;
组数信息确定模块,用于基于所述处理后的ROI图像,获得与所述预设单色通道颜色相同的测试单元图像的组数;
提取模块,用于利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像。
根据本发明的第三方面,提供了一种电子设备,包括:存储器和处理器,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据第一方面中任一项所述的方法。
根据本发明的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现根据第一方面中任意一项所述的方法。
本发明实施例提供的投影仪振镜测试单元图像的提取方法,实现了测试单元图像的自动提取,并且提高了提取工作的准确性。
通过以下参照附图对本发明的示例性实施例的详细描述,本发明的其 它特征及其优点将会变得清楚。
被结合在说明书中并构成说明书的一部分的附图示出了本发明的实施例,并且连同其说明一起用于解释本发明的原理。
图1是可用于实现本发明任意实施例的投影仪振镜测试单元图像的提取方法的电子设备的硬件配置的框图。
图2是根据本发明一个实施例的投影仪振镜测试单元图像的提取方法的处理流程图。
图3示出了投影仪投影图像的示意图。
图4是根据本例子的ROI图像的示意图。
图5示出了本例子的二值化图像的示意图。
图6示出了本例子的一组测试单元图像的示意图。
图7为根据本发明实施例的投影仪振镜测试单元图像的提取装置的原理框图。
图8是根据本发明实施例的电子设备的一种原理框图。
现在将参照附图来详细描述本发明的各种示例性实施例。应注意到:除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本发明的范围。
以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本发明及其应用或使用的任何限制。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为说明书的一部分。
在这里示出和讨论的所有例子中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它例子可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一 旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
<硬件配置>
图1是可用于实现本发明任意实施例的投影仪振镜测试单元图像的提取方法的电子设备的硬件配置的框图。
电子设备1000可以是手机、便携式电脑、平板电脑、掌上电脑等等电子设备。
电子设备1000可以包括处理器1100、存储器1200、接口装置1300、通信装置1400、显示装置1500、输入装置1600、扬声器1700、麦克风1800,等等。其中,处理器1100可以是中央处理器CPU、微处理器MCU等。存储器1200例如包括ROM(只读存储器)、RAM(随机存取存储器)、诸如硬盘的非易失性存储器等。接口装置1300例如包括USB接口、耳机接口等。通信装置1400例如能够进行有线或无线通信。显示装置1500例如是液晶显示屏、触摸显示屏等。输入装置1600例如可以包括触摸屏、键盘等。用户可以通过扬声器1700和麦克风1800输入/输出语音信息。
尽管在图1中对电子设备1000均示出了多个装置,但是,本发明可以仅涉及其中的部分装置,例如,电子设备1000只涉及存储器1200和处理器1100。
应用于本发明的实施例中,电子设备1000的所述存储器1200用于存储指令,所述指令用于控制所述处理器1100执行本发明实施例提供的投影仪振镜测试单元图像的提取方法。
在上述描述中,技术人员可以根据本发明所公开方案设计指令。指令如何控制处理器进行操作,这是本领域公知,故在此不再详细描述。
<方法实施例>
图2是根据本发明一个实施例的投影仪振镜测试单元图像的提取方法的处理流程图。该投影仪振镜测试单元图像的提取方法是由电子设备实施的。
根据图2所示,该投影仪振镜测试单元图像的提取方法可以包括以下 步骤S2100-S2800。
步骤S2100,获取工业相机采集的投影图像,其中,投影图像包括多组均匀排列的测试单元图像,其中,测试单元图像至少包括一组单色测试图案,一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,单色为红、绿、蓝中任一种。
图3示出了投影仪投影图像的示意图。
根据图3所示,投影仪将图像投影到投影幕布ABCD上,投影图像区域为A1B1C1D1,投影仪镜头与投影幕布所在平面平行。
工业相机安装在工装治具中,用于拍摄投影仪投影到投影幕布上的投影图像。工业相机的光学部件的光轴与投影幕布所在平面相互垂直。
电子设备用于控制工业相机拍照,并获取工业相机采集的投影图像以进行处理。电子设备还用于控制投影仪的振镜开启固定振动模式。
步骤S2200,从投影图像中截取感兴趣区域ROI图像。
ROI(Region of Interest)图像可以是从投影图像截取的任意位置的方形图像,例如,位于投影图像中间位置的图像。
ROI图像至少包括一组完整的测试单元图像。
步骤S2300,获取ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点。
当测试单元图像包括一组单色测试图案时,预设单色通道的颜色与该组单色测试图案的显示颜色相同。
当测试单元图像包括多组单色测试图案时,多组单色测试图案的显示颜色不同,且预设单色通道的颜色可以与任一组单色测试图案颜色相同。
图像中各像素点的颜色均是由红色、绿色、蓝色这三种单色光按照不同的比例混合而成的。红色、绿色、蓝色又称为三原色光,用英文表示为R(red)、G(green)、B(blue)。RGB各有256级亮度,用数字表示为从0、1、2...254、255。
步骤S2400,按照从上到下和从左到右的顺序,分别统计ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量。
预设亮度阈值的具体数值可以根据实际测试情况而定,例如,可以设 定为50。
步骤S2500,获得第一行数量为0的行像素点所处的第一位置信息,最后一行数量为0的行像素点所处的第二位置信息,第一列数量为0的列像素点所处的第三位置信息,以及最后一列数量为0的列像素点所处的第四位置信息。
ROI图像中,某一行预设单色通道的亮度值超过预设亮度阈值的像素点的数量为0,可以表示该行像素点不存在与预设单色通道的颜色相同的单色测试图案中的像素点。
ROI图像中,某一列预设单色通道的亮度值超过预设亮度阈值的像素点的数量为0,可以表示该列像素点不存在与预设单色通道的颜色相同的单色测试图案中的像素点。
步骤S2600,根据第一位置信息、第二位置信息、第三位置信息和第四位置信息,从ROI图像中去除不完整测试单元图像,得到处理后的ROI图像。
步骤S2700,基于处理后的ROI图像,获得与预设单色通道颜色相同的测试单元图像的组数。
步骤S2700可以进一步包括步骤S2710-S2720。
步骤S2710,统计处理后的ROI图像中、与预设单色通道颜色相同的测试单元图像中所有单色测试图案的数量。
步骤S2710具体包括如下步骤。
步骤S2711,将预设单色通道的亮度值超过预设亮度阈值的像素点的灰度值设为255,得到二值化图像。
将预设单色通道的亮度值未超过预设亮度阈值的像素点的灰度值设为0。
步骤S2712,遍历二值化图像中各像素点,将灰度值为255的像素点进行连通处理,得到至少一个连通域。
步骤S2713,统计连通域的数量,以作为单色测试图案的数量。
为了避免噪点的影响,在执行步骤S2713之前,还执行步骤S2714-S2715。
步骤S2714,统计各连通域中灰度值为255的像素点的数量。
步骤S2715,筛选得到灰度值为255的像素点的数量超过预设数量的连通域。
这样,步骤S2713进一步包括:统计灰度值为255的像素点的数量超过预设数量的连通域的数量,以作为单色测试图案的数量。
步骤S2720,根据所有单色测试图案的数量和每组单色测试图案的数量,确定单色测试图案的组数。
步骤S2800,利用组数,从处理后的ROI图像中提取一组测试单元图像。
步骤S2800进一步包括以下步骤S2810-S2840。
步骤S2810,获取处理后的ROI图像的尺寸信息。
步骤S2820,根据ROI图像的尺寸信息确定组数的排布信息。
例如,根据ROI图像的尺寸信息可以确定ROI图像为正方形图像,单色测试图案的组数为9,那么,该9组单色测试图案的排布信息为3行3列。
又例如,根据ROI图像的尺寸信息可以确定ROI图像为长方形图像,单色测试图案的组数为8,那么,沿着ROI图像的长边方向排布有4组,沿着ROI图像的短边方向排布有2组。
步骤S2830,根据处理后的ROI图像的尺寸信息和组数的排布信息,确定一组测试单元图像的尺寸信息。
步骤S2840,基于一组测试单元图像的尺寸信息,从处理后的ROI图像中提取一组测试单元图像。
本实施例中,以处理后的ROI图像中的任一顶点作为起始点,利用一组测试单元图像的尺寸信息,从处理后的ROI图像中提取一组测试单元图像。
在本发明的一个实施例中,在执行步骤S2400之前,投影仪振镜测试单元图像的提取方法还包括步骤S2900,从预设单色通道的亮度值超过预设亮度阈值的像素点中,去除红色通道的亮度值超过预设红色亮度阈值、绿色通道的亮度值超过预设绿色亮度阈值且蓝色通道的亮度值超过预设蓝 色亮度阈值的像素点。这样可以消除白色像素点的干扰。
预设红色亮度阈值、预设绿色亮度阈值和预设蓝色亮度阈值可以根据测试情况而定,例如,预设红色亮度阈值、预设绿色亮度阈值和预设蓝色亮度阈值均设定为50。
本发明实施例中,基于投影仪振镜测试单元图像的提取方法,在投影仪振镜振动之前和振动之后,分别提取一组测试单元图像,基于该两组测试单元图像确定投影仪振镜的振动是否正常工作。
本发明实施例提供的投影仪振镜测试单元图像的提取方法,实现了测试单元图像的自动提取,并且提高了提取工作的准确性。
<例子>
在本例子中,该投影仪振镜测试单元图像的提取方法可以包括以下步骤S301-S318。
步骤S301,获取工业相机采集的投影图像。
步骤S302,从投影图像中截取感兴趣区域ROI图像。
图4是根据本例子的ROI图像的示意图。
根据图4所示,ROI图像包括多组均匀排列的测试单元图像。测试单元图像包括三组单色测试图案。该三组单色测试图案的颜色不同,其中,最外围的一组单色测试图案显示为绿色,中间的一组单色测试图案显示为红色,最内侧的一组单色测试图案显示为绿色。
各组单色测试图案均包括四个沿着逆时针方向均匀排列的测试图案。其中,每一组单色测试图案中,两个测试图案水平排列以及两个测试图案竖直排列。
根据图4所示,测试单元图像除了包括三组单色测试图案,还包括多个白色圆点。
步骤S303,获取ROI图像中各像素点的预设绿色通道的亮度值,并筛选得到预设绿色通道的亮度值超过预设亮度阈值的像素点。
预设亮度阈值可以设定为50。
在本例子中,预设单色通道的颜色为绿色,还可为红色或蓝色。
步骤S304,从预设绿色通道的亮度值超过预设亮度阈值的像素点中,去除红色通道的亮度值超过预设红色亮度阈值、绿色通道的亮度值超过预设绿色亮度阈值且蓝色通道的亮度值超过预设蓝色亮度阈值的像素点,得到剩余预设绿色通道的亮度值超过预设亮度阈值的像素点。这样可以消除白色像素点的干扰。
预设红色亮度阈值、预设绿色亮度阈值和预设蓝色亮度阈值均设定为50。
步骤S305,按照从上到下和从左到右的顺序,从ROI图像中,分别统计各行和各列中剩余预设单色通道的亮度值超过预设亮度阈值的像素点的数量。
步骤S306,获得第一行数量为0的行像素点所处的第一位置信息,最后一行数量为0的行像素点所处的第二位置信息,第一列数量为0的列像素点所处的第三位置信息,以及最后一列数量为0的列像素点所处的第四位置信息。
ROI图像中,某一行剩余预设绿色通道的亮度值超过预设亮度阈值的像素点的数量为0,可以表示该行像素点不存在与预设绿色通道的颜色相同的单色测试图案中的像素点。
ROI图像中,某一列剩余预设绿色通道的亮度值超过预设亮度阈值的像素点的数量为0,可以表示该列像素点不存在与预设绿色通道的颜色相同的单色测试图案中的像素点。
步骤S307,根据第一位置信息、第二位置信息、第三位置信息和第四位置信息,从ROI图像中去除不完整测试单元图像,得到处理后的ROI图像。
步骤S308,将剩余预设绿色通道的亮度值超过预设亮度阈值的像素点的灰度值设为255,将预设绿色通道的亮度值未超过预设亮度阈值的像素点的灰度值设为0,得到二值化图像。
图5示出了本例子的二值化图像的示意图。
步骤S309,遍历二值化图像中各像素点,将灰度值为255的像素点进行连通处理,得到至少一个连通域。
步骤S310,统计各连通域中灰度值为255的像素点的数量。
步骤S312,筛选得到灰度值为255的像素点的数量超过预设数量的连通域。
步骤S313,统计灰度值为255的像素点的数量超过预设数量的连通域的数量,以作为单色测试图案的数量。这样可以消除噪点的影响。
步骤S314,根据所有单色测试图案的数量和每组单色测试图案的数量,确定单色测试图案的组数。
步骤S315,获取二值化图像的尺寸信息。
步骤S316,根据二值化图像的尺寸信息确定组数的排布信息。
根据图5所示,根据二值化图像的尺寸信息可以确定二值化图像为长方形图像,单色测试图案的组数为12,那么,沿着ROI图像的长边方向排布有4组,沿着ROI图像的短边方向排布有3组。
步骤S317,根据二值化图像的尺寸信息和组数的排布信息,确定一组测试单元图像的尺寸信息。
步骤S318,基于一组测试单元图像的尺寸信息,从二值化图像中提取一组测试单元图像。
图6示出了本例子的一组测试单元图像的示意图。
<装置实施例>
图7为根据本发明实施例的投影仪振镜测试单元图像的提取装置的原理框图。
根据图7所示,本实施例的投影仪振镜测试单元图像的提取装置7000可以包括获取模块7100、截取模块7200、筛选模块7300、统计模块7400、位置信息确定模块7500、第一去除模块7600、组数信息确定模块7700、提取模块7800。
获取模块7100用于获取工业相机采集的投影图像,其中,投影图像包括多组均匀排列的测试单元图像,其中,测试单元图像至少包括一组单色测试图案,一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,单色为红、绿、蓝中任一种。
截取模块7200用于从投影图像中截取感兴趣区域ROI图像。
筛选模块7300用于获取ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点。
统计模块7400用于按照从上到下和从左到右的顺序,分别统计ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量。
位置信息确定模块7500用于获得第一行数量为0的行像素点所处的第一位置信息,最后一行数量为0的行像素点所处的第二位置信息,第一列数量为0的列像素点所处的第三位置信息,以及最后一列数量为0的列像素点所处的第四位置信息。
第一去除模块7600用于根据第一位置信息、第二位置信息、第三位置信息和第四位置信息,从ROI图像中去除不完整测试单元图像,得到处理后的ROI图像。
组数信息确定模块7700用于基于处理后的ROI图像,获得与预设单色通道颜色相同的测试单元图像的组数。
提取模块7800用于利用组数,从处理后的ROI图像中提取一组测试单元图像。
在一个实施例中,在测试单元图像包括一组单色测试图案的情况下,预设单色通道的颜色与单色测试图案的显示颜色相同;在测试单元图像包括多组单色测试图案的情况下,多组单色测试图案的显示颜色不同,且预设单色通道的颜色与任一组单色测试图案的显示颜色相同。
在一个实施例中,组数信息确定模块7700还用于统计单元和组数信息确定单元。
统计单元用于统计处理后的ROI图像中、与预设单色通道颜色相同的测试单元图像中所有单色测试图案的数量。
组数信息确定单元用于根据所有单色测试图案的数量和每组单色测试图案的数量,确定单色测试图案的组数。
统计单元进一步用于将预设单色通道的亮度值超过预设亮度阈值的像素点的灰度值设为255,得到二值化图像;遍历二值化图像中各像素点, 将灰度值为255的像素点进行连通处理,得到至少一个连通域;统计连通域的数量,以作为单色测试图案的数量。
在一个实施例中,组数信息确定模块7700还包括筛选单元。
筛选单元用于统计各连通域中灰度值为255的像素点的数量;筛选得到灰度值为255的像素点的数量超过预设数量的连通域;
统计单元进一步用于统计灰度值为255的像素点的数量超过预设数量的连通域的数量,以作为单色测试图案的数量。
在一个实施例中,提取模块7800进一步用于获取处理后的ROI图像的尺寸信息;根据ROI图像的尺寸信息确定组数的排布信息;根据处理后的ROI图像的尺寸信息和组数的排布信息,确定一组测试单元图像的尺寸信息;基于一组测试单元图像的尺寸信息,从处理后的ROI图像中提取一组测试单元图像。
在一个实施例中,投影仪振镜测试单元图像的提取装置还包括第二去除模块。
第二去除模块,用于从预设单色通道的亮度值超过预设亮度阈值的像素点中,去除红色通道的亮度值超过预设红色亮度阈值、绿色通道的亮度值超过预设绿色亮度阈值且蓝色通道的亮度值超过预设蓝色亮度阈值的像素点。
<电子设备实施例>
在一个实施例中,根据图8所示,电子设备1000可以包括根据本发明任意实施例的投影仪振镜测试单元图像的提取装置7000,用于实施本发明任意实施例的投影仪振镜测试单元图像的提取方法。
在另一个实施例中,电子设备1000可以包括处理器1100和存储器1200。该存储器1200用于存储可执行的指令,该处理器1100用于根据指令的控制运行电子设备1000执行根据本发明任意实施例的投影仪振镜测试单元图像的提取方法。
<计算机可读存储介质>
在本实施例中,还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被处理器执行时实现如本发明任意实施例的投影仪振镜测试单元图像的提取方法。
本发明可以是系统、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本发明的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本发明操作的计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所 述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。
这里参照根据本发明实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本发明的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本发明的多个实施例的系统、方法 和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。
以上已经描述了本发明的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的技术改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。本发明的范围由所附权利要求来限定。
Claims (10)
- 一种投影仪振镜测试单元图像的提取方法,其特征在于,包括:获取工业相机采集的投影图像,其中,所述投影图像包括多组均匀排列的测试单元图像,其中,所述测试单元图像至少包括一组单色测试图案,所述一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,所述单色为红、绿、蓝中任一种;从所述投影图像中截取感兴趣区域ROI图像;获取所述ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点;按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量;获得第一行所述数量为0的行像素点所处的第一位置信息,最后一行所述数量为0的行像素点所处的第二位置信息,第一列所述数量为0的列像素点所处的第三位置信息,以及最后一列所述数量为0的列像素点所处的第四位置信息;根据所述第一位置信息、所述第二位置信息、所述第三位置信息和所述第四位置信息,从所述ROI图像中去除不完整测试单元图像,得到处理后的ROI图像;基于所述处理后的ROI图像,获得与所述预设单色通道颜色相同的测试单元图像的组数;利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像。
- 根据权利要求1所述的方法,其特征在于,所述基于所述处理后的ROI图像,获得同一类组测试单元图像的组数包括:统计所述处理后的ROI图像中、与所述预设单色通道颜色相同的测试单元图像中所有单色测试图案的数量;根据所述所有单色测试图案的数量和每组单色测试图案的数量,确定单色测试图案的组数。
- 根据权利要求2所述的方法,其特征在于,所述统计所述处理后的ROI图像中同一类组测试单元图像中所有单色测试图案的数量包括:将所述预设单色通道的亮度值超过预设亮度阈值的像素点的灰度值设为255,得到二值化图像;遍历所述二值化图像中各像素点,将灰度值为255的像素点进行连通处理,得到至少一个连通域;统计所述连通域的数量,以作为所述单色测试图案的数量。
- 根据权利要求3所述的方法,其特征在于,所述方法还包括:统计所述各连通域中灰度值为255的像素点的数量;筛选得到所述灰度值为255的像素点的数量超过预设数量的连通域;统计所述灰度值为255的像素点的数量超过预设数量的连通域的数量,以作为所述单色测试图案的数量。
- 根据权利要求1所述的方法,其特征在于,所述利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像包括:获取所述处理后的ROI图像的尺寸信息;根据所述ROI图像的尺寸信息确定所述组数的排布信息;根据所述处理后的ROI图像的尺寸信息和所述组数的排布信息,确定所述一组测试单元图像的尺寸信息;基于所述一组测试单元图像的尺寸信息,从所述处理后的ROI图像中提取一组测试单元图像。
- 根据权利要求1所述的方法,其特征在于,在所述测试单元图像包括一组单色测试图案的情况下,所述预设单色通道的颜色与所述单色测试图案的显示颜色相同;在所述测试单元图像包括多组单色测试图案的情况下,所述多组单色测试图案的显示颜色不同,且所述预设单色通道的颜色与任一组单色测试 图案的显示颜色相同。
- 根据权利要求1-6中任一所述的方法,其特征在于,在按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量之前,所述方法还包括:从所述预设单色通道的亮度值超过预设亮度阈值的像素点中,去除红色通道的亮度值超过预设红色亮度阈值、绿色通道的亮度值超过预设绿色亮度阈值且蓝色通道的亮度值超过预设蓝色亮度阈值的像素点。
- 一种投影仪振镜测试单元图像的提取装置,其特征在于,包括:获取模块,用于获取工业相机采集的投影图像,其中,所述投影图像包括多组均匀排列的测试单元图像,其中,所述测试单元图像至少包括一组单色测试图案,所述一组单色测试图案至少包括四个沿着顺时针或者逆时针方向均匀排列的测试图案,所述单色为红、绿、蓝中任一种;截取模块,用于从所述投影图像中截取感兴趣区域ROI图像;筛选模块,用于获取所述ROI图像中各像素点的预设单色通道的亮度值,并筛选得到预设单色通道的亮度值超过预设亮度阈值的像素点;统计模块,用于按照从上到下和从左到右的顺序,分别统计所述ROI图像中各行和各列中预设单色通道的亮度值超过预设亮度阈值的像素点的数量;位置信息确定模块,用于获得第一行所述数量为0的行像素点所处的第一位置信息,最后一行所述数量为0的行像素点所处的第二位置信息,第一列所述数量为0的列像素点所处的第三位置信息,以及最后一列所述数量为0的列像素点所处的第四位置信息;第一去除模块,用于根据所述第一位置信息、所述第二位置信息、所述第三位置信息和所述第四位置信息,从所述ROI图像中去除不完整测试单元图像,得到处理后的ROI图像;组数信息确定模块,用于基于所述处理后的ROI图像,获得与所述预设单色通道颜色相同的测试单元图像的组数;提取模块,用于利用所述组数,从所述处理后的ROI图像中提取一组测试单元图像。
- 一种电子设备,其特征在于,包括:存储器和处理器,所述存储器用于存储指令,所述指令用于控制所述处理器进行操作以执行根据权利要求1-7中任一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时实现根据权利要求1-7中任意一项所述的方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910695456.7 | 2019-07-30 | ||
| CN201910695456.7A CN110351540B (zh) | 2019-07-30 | 2019-07-30 | 投影仪振镜测试单元图像的提取方法、装置及电子设备 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021017396A1 true WO2021017396A1 (zh) | 2021-02-04 |
Family
ID=68179168
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2019/129224 Ceased WO2021017396A1 (zh) | 2019-07-30 | 2019-12-27 | 投影仪振镜测试单元图像的提取方法、装置及电子设备 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN110351540B (zh) |
| WO (1) | WO2021017396A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113810673A (zh) * | 2021-09-24 | 2021-12-17 | 当趣网络科技(杭州)有限公司 | 投影机均匀度测试方法、装置及计算机可读存储介质 |
| CN113902815A (zh) * | 2021-09-30 | 2022-01-07 | 歌尔光学科技有限公司 | 一种投影图像中暗带的检测方法及装置 |
| CN118730485A (zh) * | 2024-09-04 | 2024-10-01 | 深圳市艾科维达科技有限公司 | 基于检测数据的光机性能评价方法 |
Families Citing this family (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110351540B (zh) * | 2019-07-30 | 2020-09-22 | 歌尔股份有限公司 | 投影仪振镜测试单元图像的提取方法、装置及电子设备 |
| CN111650744B (zh) * | 2020-08-04 | 2020-10-30 | 成都极米科技股份有限公司 | 振镜的参数调节方法、装置、设备及可读存储介质 |
| CN112037232B (zh) * | 2020-08-13 | 2024-07-02 | 歌尔光学科技有限公司 | 振镜测试方法、装置和计算机可读存储介质 |
| CN113554560B (zh) * | 2021-06-22 | 2024-11-15 | 歌尔光学科技有限公司 | 投影画面的照度测试方法、装置、设备、系统及介质 |
| CN113610779B (zh) * | 2021-07-20 | 2024-06-11 | 歌尔光学科技有限公司 | 振镜状态检测方法、装置、设备及计算机可读存储介质 |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030107817A1 (en) * | 2001-12-08 | 2003-06-12 | Samsung Electronics Co., Ltd. | Image projection apparatus and method |
| CN108088654A (zh) * | 2017-12-07 | 2018-05-29 | 东莞职业技术学院 | 投影仪投影质量检测方法及其电子设备 |
| CN108174170A (zh) * | 2017-12-29 | 2018-06-15 | 安徽慧视金瞳科技有限公司 | 基于摄像头的投影区域尺寸自检测方法、系统及设备 |
| CN108769639A (zh) * | 2018-09-07 | 2018-11-06 | 四川长虹电器股份有限公司 | 基于投影显示的振镜自动同步系统和方法 |
| CN109348200A (zh) * | 2018-12-02 | 2019-02-15 | 江苏百通医疗器械有限公司 | 一种多光源图像分析处理器 |
| CN109451289A (zh) * | 2018-12-25 | 2019-03-08 | 鸿视线科技(北京)有限公司 | 对投影仪进行检测和校正的方法和系统 |
| CN110351540A (zh) * | 2019-07-30 | 2019-10-18 | 歌尔股份有限公司 | 投影仪振镜测试单元图像的提取方法、装置及电子设备 |
Family Cites Families (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN107505808B (zh) * | 2017-08-28 | 2019-09-10 | 海信集团有限公司 | 振镜调整方法、装置及显示设备 |
| CN109579978B (zh) * | 2018-10-16 | 2021-04-23 | 歌尔光学科技有限公司 | 测试方法及测试系统 |
| CN109752839B (zh) * | 2018-12-18 | 2021-06-08 | 华为技术有限公司 | 处理器、显示控制装置、系统、图像处理方法及装置 |
-
2019
- 2019-07-30 CN CN201910695456.7A patent/CN110351540B/zh active Active
- 2019-12-27 WO PCT/CN2019/129224 patent/WO2021017396A1/zh not_active Ceased
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20030107817A1 (en) * | 2001-12-08 | 2003-06-12 | Samsung Electronics Co., Ltd. | Image projection apparatus and method |
| CN108088654A (zh) * | 2017-12-07 | 2018-05-29 | 东莞职业技术学院 | 投影仪投影质量检测方法及其电子设备 |
| CN108174170A (zh) * | 2017-12-29 | 2018-06-15 | 安徽慧视金瞳科技有限公司 | 基于摄像头的投影区域尺寸自检测方法、系统及设备 |
| CN108769639A (zh) * | 2018-09-07 | 2018-11-06 | 四川长虹电器股份有限公司 | 基于投影显示的振镜自动同步系统和方法 |
| CN109348200A (zh) * | 2018-12-02 | 2019-02-15 | 江苏百通医疗器械有限公司 | 一种多光源图像分析处理器 |
| CN109451289A (zh) * | 2018-12-25 | 2019-03-08 | 鸿视线科技(北京)有限公司 | 对投影仪进行检测和校正的方法和系统 |
| CN110351540A (zh) * | 2019-07-30 | 2019-10-18 | 歌尔股份有限公司 | 投影仪振镜测试单元图像的提取方法、装置及电子设备 |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113810673A (zh) * | 2021-09-24 | 2021-12-17 | 当趣网络科技(杭州)有限公司 | 投影机均匀度测试方法、装置及计算机可读存储介质 |
| CN113810673B (zh) * | 2021-09-24 | 2023-05-30 | 当趣网络科技(杭州)有限公司 | 投影机均匀度测试方法、装置及计算机可读存储介质 |
| CN113902815A (zh) * | 2021-09-30 | 2022-01-07 | 歌尔光学科技有限公司 | 一种投影图像中暗带的检测方法及装置 |
| CN118730485A (zh) * | 2024-09-04 | 2024-10-01 | 深圳市艾科维达科技有限公司 | 基于检测数据的光机性能评价方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN110351540B (zh) | 2020-09-22 |
| CN110351540A (zh) | 2019-10-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110351540B (zh) | 投影仪振镜测试单元图像的提取方法、装置及电子设备 | |
| KR102595704B1 (ko) | 영상 검측 방법, 장치, 전자 기기, 저장 매체 및 프로그램 | |
| US12579669B2 (en) | Estimating depth based on iris size | |
| US20170013191A1 (en) | No-reference image and video quality evaluation | |
| WO2021042638A1 (zh) | 投影仪振镜测试目标图的提取方法、装置及电子设备 | |
| US20150097932A1 (en) | Digital cinema projection method, optimization device and projection system | |
| US10354364B2 (en) | Automatic perspective control using vanishing points | |
| CN106791737B (zh) | 投影画面的颜色校正方法及装置 | |
| US9432645B2 (en) | Information processing method and electronic device | |
| CN113740035B (zh) | 投影质量检测方法、装置、设备及可读存储介质 | |
| US10194122B2 (en) | Method for controlling projector and projector applicable to same | |
| CN104010124A (zh) | 一种显示滤镜效果的方法、装置和移动终端 | |
| CN109035147B (zh) | 图像处理方法及装置、电子装置、存储介质和计算机设备 | |
| CN104021746A (zh) | 一种图像检测的方法及装置 | |
| TW201642244A (zh) | 透明顯示裝置及其影像調整方法 | |
| WO2017092341A1 (zh) | 一种测试方法和装置 | |
| EP3273439A1 (en) | Method and device for enhancing color saturation | |
| CN108965863B (zh) | 相机光学中心和vr透镜中心对齐的控制方法及装置 | |
| US10182184B2 (en) | Image processing apparatus and image processing method | |
| CN202841396U (zh) | 一种数字电影优化装置和放映系统 | |
| CN113554560B (zh) | 投影画面的照度测试方法、装置、设备、系统及介质 | |
| CN104361572A (zh) | 图片处理方法和装置 | |
| CN104423027A (zh) | 显微镜 | |
| CN109348219B (zh) | 一种不同结构下图像转换的方法及图像转换装置 | |
| CN113099191B (zh) | 一种图像处理方法及装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19939762 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19939762 Country of ref document: EP Kind code of ref document: A1 |