WO2022142172A1 - 一种检测近场物体的方法、装置、介质和电子设备 - Google Patents

一种检测近场物体的方法、装置、介质和电子设备 Download PDF

Info

Publication number
WO2022142172A1
WO2022142172A1 PCT/CN2021/100720 CN2021100720W WO2022142172A1 WO 2022142172 A1 WO2022142172 A1 WO 2022142172A1 CN 2021100720 W CN2021100720 W CN 2021100720W WO 2022142172 A1 WO2022142172 A1 WO 2022142172A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
area
light
background
generating
Prior art date
Application number
PCT/CN2021/100720
Other languages
English (en)
French (fr)
Inventor
于炀
吴震
Original Assignee
北京石头创新科技有限公司
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 北京石头创新科技有限公司 filed Critical 北京石头创新科技有限公司
Priority to US18/259,411 priority Critical patent/US20240071023A1/en
Priority to EP21912930.1A priority patent/EP4274215A1/en
Publication of WO2022142172A1 publication Critical patent/WO2022142172A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/10Image acquisition
    • G06V10/12Details of acquisition arrangements; Constructional details thereof
    • G06V10/14Optical characteristics of the device performing the acquisition or on the illumination arrangements
    • G06V10/141Control of illumination
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/20Control system inputs
    • G05D1/24Arrangements for determining position or orientation
    • G05D1/242Means based on the reflection of waves generated by the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/60Intended control result
    • G05D1/617Safety or protection, e.g. defining protection zones around obstacles or avoiding hazards
    • G05D1/622Obstacle avoidance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/60Extraction of image or video features relating to illumination properties, e.g. using a reflectance or lighting model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/10Terrestrial scenes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/74Circuitry for compensating brightness variation in the scene by influencing the scene brightness using illuminating means
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D2109/00Types of controlled vehicles
    • G05D2109/10Land vehicles
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D2111/00Details of signals used for control of position, course, altitude or attitude of land, water, air or space vehicles
    • G05D2111/10Optical signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20224Image subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/07Target detection
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Definitions

  • the present disclosure relates to the field of robotics, and in particular, to a method, apparatus, medium and electronic device for detecting near-field objects.
  • the field of view of the camera determines the field of view of the camera.
  • the optical axis of the camera is the center line passing through the center point of the camera lens, and the direction of the optical axis changes, which means that the camera rotates or turns.
  • Self-propelled devices often use front-facing cameras to collect obstacle information. Therefore, the obstacle information obtained by the front camera will affect the walking mode of the self-propelled device.
  • the present disclosure provides a method for detecting a near-field object, characterized by comprising:
  • generating a third image including regional bright spots based on the first image and the second image includes:
  • the first difference image is binarized based on a preset binarization threshold to generate the third image.
  • generating a third image including regional bright spots based on the first image and the second image includes:
  • the second difference image is binarized based on a preset binarization threshold to generate the third image.
  • generating the second background image based on the mean value of pixel values in the first area image includes:
  • the mean value of the pixel values in each first area block is respectively calculated to generate the second background image, wherein the second background image includes a plurality of background area blocks corresponding to the plurality of first area blocks.
  • generating the second difference image according to the second area image and the second background image includes:
  • the second difference image is generated based on the second area block and the corresponding background area block, respectively.
  • determining whether there is a near-field object based on the connected domain of the bright spot in the third image includes:
  • the area size value is greater than or equal to a preset area size threshold, it is determined that the near-field object exists.
  • the collection of the first image before the supplementary light supplements the light, and the second image when the supplementary light is activated to supplement the light includes:
  • the second image is collected when the supplementary light is activated for supplementary light and the supplementary light parameter value is adjusted.
  • it also includes: rotating or turning, after the rotation or turning or in the process of rotating or turning, collecting the first image before the fill light fills up light, and the second image when the fill light fills up the light when the fill light is activated. image.
  • the present disclosure provides an apparatus for detecting near-field objects, including:
  • a collection unit configured to collect a first image before the supplementary light is used for supplementing light, and a second image when the supplementary light is activated for supplementing light;
  • a processing unit configured to generate a third image including regional bright spots based on the first image and the second image
  • An analysis unit configured to determine whether there is a near-field object based on the connected domain of the bright spot in the third image.
  • processing unit is used for:
  • the first difference image is binarized based on a preset binarization threshold to generate the third image.
  • processing unit is used for:
  • the second difference image is binarized based on a preset binarization threshold to generate the third image.
  • generating the second background image based on the mean value of pixel values in the first area image includes:
  • the mean value of the pixel values in each first area block is respectively calculated to generate the second background image, wherein the second background image includes a plurality of background area blocks corresponding to the plurality of first area blocks.
  • generating the second difference image according to the second area image and the second background image includes:
  • the second difference image is generated based on the second area block and the corresponding background area block, respectively.
  • the analysis unit is used for:
  • the area size value is greater than or equal to a preset area size threshold, it is determined that the near-field object exists.
  • the collection unit is used for:
  • the second image is collected when the supplementary light is activated for supplementary light and the supplementary light parameter value is adjusted.
  • the collection unit is further used for:
  • the first image before the supplementary light is supplemented, and the second image when the supplementary light is activated to supplement the light is collected.
  • the present disclosure provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, implements the detection of a near-proximity according to any one of the first aspect. method of the field object.
  • the present disclosure provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are When executed, the one or more processors cause the one or more processors to implement the method for detecting a near-field object according to any one of the first aspect.
  • Fig. 1 shows the schematic diagram of the self-propelled equipment in front of the corner and obstacles
  • Fig. 2 shows the schematic diagram of the self-propelled equipment at close range with the obstacle after turning the corner
  • FIG. 3 shows a flowchart of a method for detecting a near-field object according to an embodiment of the present disclosure
  • Fig. 4 shows the logic schematic diagram of near-field object detection based on fill light
  • FIG. 5 shows a unit block diagram of an apparatus for detecting a near-field object according to an embodiment of the present disclosure
  • FIG. 6 shows a schematic diagram of a connection structure of an electronic device according to an embodiment of the present disclosure.
  • the term “including” and variations thereof are open-ended inclusions, ie, "including but not limited to”.
  • the term “based on” is “based at least in part on.”
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one additional embodiment”; the term “some embodiments” means “at least some embodiments”. Relevant definitions of other terms will be given in the description below.
  • the front camera cannot find the obstacle behind the corner within the field of view angle shown by the dotted line due to the obstruction of the corner by the obstacle; such as As shown in FIG. 2 , after the self-propelled device turns a corner, the self-propelled device cannot identify the obstacle because the distance between the obstacle and the self-propelled device is too close.
  • a method of detecting a near-field object According to a first aspect of the present disclosure, there is provided a method of detecting a near-field object.
  • step S101 a first image before the supplementary light is used to supplement the light, and a second image when the supplementary light is activated to supplement the light is collected.
  • Self-propelled devices often use front-facing cameras to collect obstacle information.
  • the automatic exposure device (AE for short) of the fill light before the fill light, the automatic exposure device (AE for short) of the fill light is in a stable state (AE stable for short).
  • the AE of the fill light When the fill light is turned on, the AE of the fill light is in an overexposed state at first, and then gradually transitions to a stable state after a certain period of adjustment. After the steady state lasts for a period of time, turn off the fill light.
  • the background time the time from when the AE of the fill light enters a stable state to when the fill light is turned on
  • the detection time the time from when the fill light is turned on to when the fill light is turned off.
  • a near-field object image can be captured at the background time; during the detection time, the near-field object image captured when the AE of the fill light is overexposed is prone to overexposure. After the AE of the fill light is stabilized, a clear near-field object image with high brightness can be captured.
  • the example of the present disclosure utilizes the characteristics of the fill light before and after the fill light.
  • the embodiment of the present disclosure selects to collect images after the self-propelled device rotates or turns and stops. And in the same direction, that is, when the direction of the optical axis of the camera remains unchanged, the first image is collected before the fill light is filled (that is, the fill light is in the background time), and the first image is collected when the fill light is activated (that is, the fill light is filled).
  • a second image of the lamp is acquired at the detection time and the AE is in the overexposure state. If there is a near-field object in front of the camera, the first image is an image of the near-field object under normal lighting, and the second image is an image of the near-field object under fill light.
  • the filled-in image includes regional bright spots. The area bright spot is that the brightness of the local area in the image exceeds the normal range, so that the actual color or pattern of the local area in the image cannot be distinguished.
  • the embodiment of the present disclosure selects to collect images in the process of rotating or turning, so that near-field objects can be quickly found, and the speed of recognition can be improved.
  • the collecting of the second image when the supplementary light is started for supplementing light includes the following steps:
  • Step S101 when the supplementary light is activated for supplementary light and the supplementary light parameter value is adjusted, the second image is collected.
  • the AE of the fill light is in an overexposed state.
  • an overexposed image of a near-field object can be acquired. Since the second image was collected with the fill light in the overexposure state of AE, the strong light caused the near-field objects to produce strong reflections, resulting in a larger and more obvious area bright spot on the second image. Near-field objects can be more easily analyzed.
  • Step S102 Perform image processing based on the first image and the second image to generate a third image including regional bright spots.
  • a third image including regional bright spots is extracted therefrom.
  • Step S103 analyze the connected domain of the bright spot in the third image, and determine whether there is a near-field object.
  • Embodiments of the present disclosure determine whether there is a near-field object based on the connectivity.
  • the analysis of the connected domain of the bright spot in the third image to determine whether there is a near-field object includes the following steps:
  • Step S103-1 based on a preset pixel threshold, obtain a region size value of a connected region of bright spots in the third image.
  • the same or similar pixel values are considered within the range of the statistical bright spot area through a preset pixel threshold.
  • the area size value is also the value of the connected area composed of the same or similar pixel values. This value can be represented by the number of pixels in the regional highlight, or by the percentage of the number of pixels in the regional highlight to the number of pixels in the third image.
  • Step S103-2 when the area size value is greater than or equal to a preset area size threshold, it is determined that the near-field object exists.
  • whether the area size value is greater than or equal to the preset area size threshold is used as the basis for judging whether there is a near-field object. That is, if there is a near-field object, and the near-field object in the image captured by the AE of the fill light is in the overexposed state, there must be a large area of overexposure, and the area size value must be greater than or equal to the preset area size threshold; If the size value is smaller than the preset area size threshold, it indicates that there are no near-field objects.
  • the embodiments of the present disclosure take advantage of the characteristics of the automatic exposure device before and after the fill light fills the light, shoot two images in the same direction before and after the fill light fills the light, and determine whether there is a near-field object by comparing the two images. Without adding additional devices, the task of discovering near-field objects by the self-propelled device is completed by using the existing device, and the collision between the self-propelled device and the near-field objects is avoided.
  • Step S102-11 performing mean calculation based on pixel values in the first image to generate a first background image.
  • the mean value calculation can be understood as calculating the mean value of the sum of all pixel values in the first image.
  • Each pixel value that generates the first background image is the average value.
  • the color of the first background image is a single color image.
  • Step S102-12 Perform difference calculation according to the second image and the first background image to generate a first difference image.
  • the difference calculation can be understood as calculating the difference between the pixel value of each position in the second image and the pixel value of the corresponding position in the first background image.
  • Step S102-13 Perform binarization processing based on a preset binarization threshold and the first difference image to generate the third image.
  • the binarization process can be understood as setting the gray value of the pixels in the image to 0 or 255, that is, the process of presenting the entire image with an obvious black and white effect.
  • step S102-1 of the second embodiment performing image processing based on the first image and the second image to generate a third image including regional bright spots includes the following steps:
  • Step S102-21 acquiring a first region image from the first image based on a preset region of interest.
  • the area that needs to be processed in the image is outlined in the form of closed lines (such as rectangular lines, circular lines, elliptical lines or irregular polygon lines) from the processed image, which is called the region of interest (The full English name is region of interest, or ROI for short).
  • region of interest The full English name is region of interest, or ROI for short.
  • Various operators and functions are commonly used in machine vision software to obtain ROI and perform image processing.
  • an area within a preset rectangular line in the middle of the image may be used as a preset ROI, and an image of the first area may be obtained therefrom. The purpose is to reduce the influence of ground reflection on image analysis after fill light.
  • Step S102-22 performing mean calculation based on pixel values in the first area image to generate a second background image.
  • Step S102-22-1 Divide the first region image into a plurality of first region blocks based on a preset block size.
  • the first area image is divided into a plurality of first area blocks.
  • the first region image can be conveniently divided into a plurality of low-resolution first region blocks by means of window shifting, the purpose of which is to reduce the computational complexity.
  • the default block size is usually set to 8 ⁇ 8 pixels.
  • Step S102-22-2 Perform mean calculation on the pixel values in each first area block to generate the second background image.
  • the second background image includes a background area block at the same position as the first area block.
  • Step S102-23 acquiring a second region image from the second image based on the preset region of interest.
  • the preset region of interest is the same as the preset region of interest for acquiring the first region image.
  • Step S102-24 Perform difference calculation according to the second area image and the second background image to generate a second difference image.
  • the difference calculation can be understood as calculating the difference between the pixel value of each position in the second area image and the pixel value of the corresponding position in the second background image.
  • performing difference calculation according to the second area image and the second background image to generate a second difference image includes the following steps:
  • Step S102-24-1 Divide the second area image into a plurality of second area blocks corresponding to the background area blocks based on the positions of the background area blocks.
  • the size of the second background image is the same as that of the second area image, and the position of each second area block in the second area image has a corresponding background area block at the same position of the second background image.
  • Step S102-24-2 Perform difference calculation based on the second area block and the corresponding background area block, respectively, to generate the second difference image.
  • the difference calculation can be understood as calculating the difference between the pixel value of each position in the second area block and the pixel value of the corresponding position in the second background image.
  • Step S102-25 Perform binarization processing based on a preset binarization threshold and the second difference image to generate the third image.
  • the embodiment of the present disclosure reduces the influence of ground reflection on image analysis after supplementary light by extracting the ROI. At the same time, by dividing the image into blocks, the computational complexity is reduced.
  • Said rotation or turning stop includes the following steps:
  • the directions for acquiring the first image and acquiring the second image are the same.
  • the embodiment of the present disclosure makes the self-propelled device stop every time it rotates by a certain angle or for a certain period of time to determine whether there is a near-field object. This further increases the safety of rotations or turns.
  • a device for detecting a near-field object is also provided. Since the embodiments in the second aspect are basically similar to the embodiments in the first aspect, the description is relatively simple, and for relevant parts, please refer to the corresponding descriptions of the embodiments in the first aspect.
  • the apparatus embodiments described below are merely illustrative.
  • FIG. 5 shows an embodiment of an apparatus for detecting near-field objects provided by the present disclosure.
  • the present disclosure provides a device for detecting near-field objects, including:
  • a collection unit 501 configured to collect a first image before the supplementary light is used for supplementing light, and a second image when the supplementary light is activated to supplement the light;
  • a processing unit 502 configured to generate a third image including regional bright spots based on the first image and the second image;
  • the analyzing unit 503 is configured to determine whether there is a near-field object based on the connected domain of the regional bright spots in the third image.
  • processing unit 502 is configured to:
  • the third image is generated by performing binarization processing based on a preset binarization threshold and the first difference image.
  • processing unit 502 is configured to:
  • the third image is generated by performing binarization processing based on a preset binarization threshold and the second difference image.
  • generating the second background image by performing mean value calculation based on pixel values in the first area image includes:
  • the mean value of the pixel values in each first area block is respectively calculated to generate the second background image, wherein the second background image includes a background area block at the same position as the first area block.
  • performing difference calculation according to the second area image and the second background image to generate the second difference image includes:
  • the second difference image is generated by performing difference calculation based on the second area block and the corresponding background area block, respectively.
  • the analysis unit 503 is used for:
  • the area size value is greater than or equal to a preset area size threshold, it is determined that the near-field object exists.
  • the collection unit 501 is used for:
  • the second image is collected when the supplementary light is activated for supplementary light and the supplementary light parameter value is adjusted.
  • the collection unit 501 is further configured to: after the rotation or turning or during the rotation or turning, collect the first image before the supplementary light is supplemented, and when the supplementary light is started to supplement the light. of the second image.
  • the embodiments of the present disclosure take advantage of the characteristics of the automatic exposure device before and after the fill light fills the light, shoot two images in the same direction before and after the fill light fills the light, and determine whether there is a near-field object by comparing the two images. Without adding additional devices, the task of discovering near-field objects by the self-propelled device is completed by using the existing device, and the collision between the self-propelled device and the near-field objects is avoided.
  • an electronic device for a method of detecting a near-field object.
  • the electronic device includes: at least one processor; and, a memory communicatively connected to the at least one processor; wherein,
  • the memory stores instructions executable by the one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a method of detecting near-field objects as described in the first embodiment. method.
  • a computer storage medium for detecting near field objects stores computer-executable instructions that execute the method for detecting near-field objects as described in the first embodiment.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (eg, mobile terminals such as in-vehicle navigation terminals), etc., and stationary terminals such as digital TVs, desktop computers, and the like.
  • the electronic device shown in FIG. 6 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • the electronic device may include a processing device (eg, a central processing unit, a graphics processor, etc.) 601 that may be loaded into a random access memory according to a program stored in a read only memory (ROM) 602 or from a storage device 608
  • the program in the (RAM) 603 executes various appropriate operations and processes.
  • various programs and data required for the operation of the electronic device are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to bus 604 .
  • I/O interface 605 input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, vibration An output device 607 of a computer, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. Communication means 609 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While FIG. 6 illustrates an electronic device having various means, it should be understood that not all of the illustrated means are required to be implemented or available. More or fewer devices may alternatively be implemented or provided.
  • input devices 606 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.
  • LCD liquid crystal display
  • speakers vibration
  • storage device 608 including, for example, a magnetic tape, a hard
  • embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication device 609, or from the storage device 608, or from the ROM 602.
  • the processing apparatus 601 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • a computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave with computer-readable program code embodied thereon. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, electrical wire, optical fiber cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
  • clients and servers can communicate using any currently known or future developed network protocols such as HTTP (HyperText Transfer Protocol), and can communicate with digital data in any form or medium.
  • Communication eg, a communication network
  • Examples of communication networks include local area networks (“LAN”), wide area networks (“WAN”), the Internet (eg, the Internet), and peer-to-peer networks (eg, ad hoc peer-to-peer networks), as well as any currently known or future development network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or may exist alone without being assembled into the electronic device.
  • Computer program code for performing operations of the present disclosure may be written in one or more programming languages, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and This includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server.
  • the remote computer may 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 may be connected to an external computer (eg, using an Internet service provider through Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or operations , or can be implemented in a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments of the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Among them, the name of the unit does not constitute a limitation of the unit itself under certain circumstances.
  • exemplary types of hardware logic components include: Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), Systems on Chips (SOCs), Complex Programmable Logical Devices (CPLDs) and more.
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs Systems on Chips
  • CPLDs Complex Programmable Logical Devices
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in connection with the instruction execution system, apparatus or device.
  • the machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • Machine-readable media may include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), fiber optics, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Software Systems (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

一种检测近场物体的方法、装置、介质和电子设备。本公开利用补光灯补光前后自动曝光装置的特点,在补光灯补光前后对同一方向上拍摄两个图像,通过两个图像的对比确定是否存在近场物体。在不增加额外装置的情况下,利用现有装置完成了自行走设备发现近场物体的任务,避免了自行走设备与近场物体发生碰撞。

Description

一种检测近场物体的方法、装置、介质和电子设备
相关申请的交叉引用
本申请要求2020年12月30日提交的中国专利申请号202011619047.8的优先权,该中国专利申请的全部内容以其整体通过引用并入本文。
技术领域
本公开涉及机器人技术领域,具体而言,涉及一种检测近场物体的方法、装置、介质和电子设备。
背景技术
摄像机的视角(英文全称field of view,简称FOV)大小决定了摄像机的视野范围。摄像机的光轴是通过摄像机镜头中心点的中心线,光轴方向发生变化,也就意味着摄像机发生旋转或转弯。
自行走设备往往采用前置摄像机采集障碍物信息。因此,前置摄像机得到的障碍物信息会影响自行走设备的行走方式。
发明内容
提供该发明内容部分以便以简要的形式介绍构思,这些构思将在后面的具体实施方式部分被详细描述。该发明内容部分并不旨在标识要求保护的技术方案的关键特征或必要特征,也不旨在用于限制所要求的保护的技术方案的范围。
根据本公开的具体实施方式,第一方面,本公开提供一种检测近场物体的方法,其特征在于,包括:
采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像;
基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像;
基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
可选的,所述基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像,包括:
基于所述第一图像中的像素值的均值,生成第一背景图像;
根据所述第二图像和所述第一背景图像,生成第一差异图像;
基于预设二值化阈值对所述第一差异图像进行二值化处理,生成所述第三图像。
可选的,所述基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像,包括:
从所述第一图像中获取第一区域图像;
基于所述第一区域图像中的像素值的均值,生成所述第二背景图像;
基于所述预设兴趣区域从所述第二图像中获取对应于所述第一区域图像的第二区域图像;
根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像;
基于预设二值化阈值对所述第二差异图像进行二值化处理,生成所述第三图像。
可选的,所述基于所述第一区域图像中的像素值的均值,生成所述第二背景图像,包括:
将所述第一区域图像分成多个第一区域块;
分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像,其中,所述第二背景图像包括与所述多个第一区域块对应的多个背景区域块。
可选的,所述根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像,包括:
基于所述背景区域块将所述第二区域图像分成多个对应所述背景区域块的第二区域块;
分别基于所述第二区域块和对应的所述背景区域块,生成所述第二差异图像。
可选的,所述基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体,包括:
获取所述第三图像中区域亮斑连通域的区域大小值;
当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
可选的,所述采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像,包括:
当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
可选的,还包括:旋转或转弯,在旋转或转弯之后或在旋转或转弯的过程 中,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
根据本公开的具体实施方式,第二方面,本公开提供一种检测近场物体的装置,包括:
采集单元,用于采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像;
处理单元,用于基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像;
分析单元,用于基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
可选的,所述处理单元,用于:
基于所述第一图像中的像素值的均值,生成第一背景图像;
根据所述第二图像和所述第一背景图像,生成第一差异图像;
基于预设二值化阈值对所述第一差异图像进行二值化处理,生成所述第三图像。
可选的,所述处理单元,用于:
从所述第一图像中获取第一区域图像;
基于所述第一区域图像中的像素值的均值,生成所述第二背景图像;
从所述第二图像中获取对应于所述第一区域图像的第二区域图像;
根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像;
基于预设二值化阈值对所述第二差异图像进行二值化处理,生成所述第三图像。
可选的,所述基于所述第一区域图像中的像素值的均值,生成所述第二背景图像,包括:
将所述第一区域图像分成多个第一区域块;
分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像,其中,所述第二背景图像包括与所述多个第一区域块对应的多个背景区域块。
可选的,所述根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像,包括:
基于所述背景区域块将所述第二区域图像分成多个对应所述背景区域块的第二区域块;
分别基于所述第二区域块和对应的所述背景区域块,生成所述第二差异图 像。
可选的,所述分析单元,用于:
获取所述第三图像中区域亮斑连通域的区域大小值;
当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
可选的,所述采集单元,用于:
当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
可选的,所述采集单元,还用于:
在旋转或转弯之后或在旋转或转弯的过程中,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
根据本公开的具体实施方式,第三方面,本公开提供一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如第一方面任一项所述检测近场物体的方法。
根据本公开的具体实施方式,第四方面,本公开提供一种电子设备,包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如第一方面任一项所述检测近场物体的方法。
附图说明
结合附图并参考以下具体实施方式,本公开各实施例的上述和其他特征、优点及方面将变得更加明显。贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,元件和元素不一定按照比例绘制。在附图中:
图1示出了自行走设备转角前与障碍物的示意图;
图2示出了自行走设备转角后与障碍物近距离示意图;
图3示出了根据本公开实施例的检测近场物体的方法的流程图;
图4示出了基于补光灯近场物体检测逻辑示意图;
图5示出了根据本公开实施例的检测近场物体的装置的单元框图;
图6示出了根据本公开的实施例的电子设备连接结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的实施例。虽然附图中显示了本公开的某些实施例,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实施例,相反提供这些实施例是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实施例仅用于示例性作用,并非用于限制本公开的保护范围。
应当理解,本公开的方法实施方式中记载的各个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
例如,如图1所示,自行走设备在转角一侧运动时,由于转角对障碍物的阻挡,在虚线所示出的视场角度内,前置摄像机无法发现处于转角后的障碍物;如图2所示,当自行走设备转过转角后,由于障碍物与自行走设备距离过近,使自行走设备无法识别障碍物。
下面结合附图详细说明本公开的可选实施例。
根据本公开的第一方面,提供了一种检测近场物体的方法。
下面结合附图对本公开的第一方面中提供的检测近场物体的方法实施例进行详细说明。
实施例一
如图3所示,步骤S101,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
自行走设备常采用前置摄像头采集障碍物信息。如图4所示,正常光照场景下,在补光前,补光灯的自动曝光装置(简称AE)处于稳定状态(简称AE稳定)。当打开补光灯后,补光灯的AE先是处于过曝状态,经过一定时间调整后逐渐过渡到稳定状态。稳定状态持续一段时间后,关闭补光灯。补光前,补光灯的AE进入稳定状态到打开补光灯的这段时间称为背景时间,打开补光灯到关闭补光灯的这等时间称为探测时间。
在正常光照下,如果摄像头前存在近场物体,则在背景时间能够拍摄到一张近场物体图像;在探测时间,补光灯的AE处于过曝状态下拍摄的近场物体图像易产生过曝现象,而补光灯的AE稳定后能够拍摄到亮度较高的清晰的近场物体图像。本公开实例利用了补光灯补光前后的特点。
为了保证拍摄的稳定性,本公开实施例选择在自行走设备旋转或转弯停顿后采集图像。并且在同一方向上,也就是摄像头光轴方向不变的情况下,分别在补光灯补光前(即补光灯在背景时间)采集第一图像,在补光灯启动时(即补光灯的在探测时间且AE处于过曝状态)采集第二图像。如果摄像头前存在近场物体,则第一图像是一张近场物体在正常光照下的图像,而第二图像是一张近场物体在补光下的图像。该补光后的图像中包括了区域亮斑。所述区域亮斑也就是在图像中局部区域的明亮程度超出正常范围,以致无法分辨图像中该局部区域实际的颜色或图案。
可选的,本公开实施例选择在旋转或转弯的过程中采集图像,这样可以迅速发现近场物体,提升识别的速度。
可选的,所述采集启动所述补光灯补光时的第二图像,包括以下步骤:
步骤S101,当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
所述启动所述补光灯补光且补光参数值调整时可以理解为补光灯的AE处于过曝状态时,在此情况下,能够获取近场物体的过曝图像。由于第二图像是补光灯在AE处于过曝状态下采集的,强烈的光线使近场物体产生强烈的反光,从而在第二图像上产生更大面积的、更明显的区域亮斑。能够更容易分析出近场物体。
步骤S102,基于所述第一图像和所述第二图像进行图像处理,生成包括区域亮斑的第三图像。
通过对第一图像和所述第二图像进行图像处理,从中提取出包括区域亮斑 的第三图像。
步骤S103,分析所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
在图像上,区域亮斑通常是由相同或相近的像素值组成的,因此,该区域存在相同或相近像素值的连通性。本公开实施例根据该连通性确定是否存在近场物体。
具体地,所述分析所述第三图像中区域亮斑的连通域确定是否存在近场物体,包括以下步骤:
步骤S103-1,基于预设像素阈值获取所述第三图像中区域亮斑连通域的区域大小值。
通过预设像素阈值将相同或相近像素值考虑在统计亮斑区域的范围内。区域大小值也就是相同或相近像素值组成连通区域的值。这个值可以由区域亮斑中像素个数表示,也可以由区域亮斑中像素个数与第三图像中像素个数的百分比表示。
步骤S103-2,当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
但是,在正常光照场景下,很多物体都可能存在亮斑。也就是存在亮斑的物体不一定就是近场物体。本公开实施例通过区域大小值是否大于或等于预设区域大小阈值作为判断是否存在近场物体的依据。也就是,如果存在近场物体,补光灯的AE处于过曝状态下拍摄的图像中近场物体一定出现大面积过曝现象,则区域大小值一定大于或等于预设区域大小阈值;如果区域大小值小于预设区域大小阈值,则表明不存在近场物体。
本公开实施例利用补光灯补光前后自动曝光装置的特点,在补光灯补光前后对同一方向上拍摄两个图像,通过两个图像的对比确定是否存在近场物体。在不增加额外装置的情况下,利用现有装置完成了自行走设备发现近场物体的任务,避免了自行走设备与近场物体发生碰撞。
实施例二
由于本公开实施例是基于实施例一进行进一步优化,基于相同方法以及相同名称含义的解释与上述实施例相同,此处不再赘述。
对于实施例一中所述基于所述第一图像和所述第二图像进行图像处理,生成包括区域亮斑的第三图像,包括以下步骤:
步骤S102-11,基于所述第一图像中的像素值进行均值计算,生成第一背景图像。
所述均值计算可以理解为计算第一图像中所有像素值的和的平均值。生成第一背景图像的每个像素值均为该平均值。第一背景图像的颜色为单一颜色的图像。
步骤S102-12,根据所述第二图像和所述第一背景图像进行差值计算,生成第一差异图像。
此处,所述差值计算可以理解为计算第二图像中的每个位置的像素值与第一背景图像中对应位置的像素值的差值。
步骤S102-13,基于预设二值化阈值和所述第一差异图像进行二值化处理,生成所述第三图像。
所述二值化处理可以理解为将图像中像素的灰度值设置为0或255,也就是将整个图像呈现出明显的黑白效果的过程。
本公开实施例对第一图像和所述第二图像进行进一步的图像处理,使包括区域亮斑的第三图像更简单,更易于处理。
实施例三
由于本公开实施例是基于实施例一进行进一步优化,基于相同方法以及相同名称含义的解释与上述实施例相同,此处不再赘述。
实施例二中步骤S102-1,所述基于所述第一图像和所述第二图像进行图像处理,生成包括区域亮斑的第三图像,包括以下步骤:
步骤S102-21,基于预设兴趣区域从所述第一图像中获取第一区域图像。
在机器视觉、图像处理中,从被处理的图像中以封闭线条(比如,矩形线条、圆形线条、椭圆形线条或不规则多边形线条)方式勾勒出图像中需要处理的区域,称为兴趣区域(英文全称region of interest,简称ROI)。在机器视觉软件上常用到各种算子和函数来求得ROI,并进行图像处理。本公开实施例可以将图像中部预设矩形线条内的区域作为预设ROI,并从中获取第一区域图像。目的是减少补光后地面反射对图像分析的影响。
步骤S102-22,基于所述第一区域图像中的像素值进行均值计算,生成第二背景图像。
在一个具体应用中,具体包括以下步骤:
步骤S102-22-1,基于预设块尺寸大小将所述第一区域图像分成多个第一区 域块。
可以理解为,将第一区域图像划分为多个第一区域块。通过移窗的方式能够方便的将第一区域图像分成多个低分辨率的第一区域块,其目的是为了降低了计算的复杂度。预设块尺寸大小通常设置为8×8像素。
步骤S102-22-2,分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像。
其中,所述第二背景图像包括与所述第一区域块位置相同的背景区域块。
步骤S102-23,基于所述预设兴趣区域从所述第二图像中获取第二区域图像。
此处,所述预设兴趣区域与获取第一区域图像的预设兴趣区域相同。
步骤S102-24,根据所述第二区域图像和所述第二背景图像进行差值计算,生成第二差异图像。
此处,所述差值计算可以理解为计算第二区域图像中的每个位置的像素值与第二背景图像中对应位置的像素值的差值。
在一个具体应用中,所述根据所述第二区域图像和所述第二背景图像进行差值计算,生成第二差异图像,包括以下步骤:
步骤S102-24-1,基于所述背景区域块的位置将所述第二区域图像分成多个对应所述背景区域块的第二区域块。
可以理解为,第二背景图像与第二区域图像的尺寸大小相同,第二区域图像中每个第二区域块的位置在第二背景图像相同位置均有一个对应背景区域块。
步骤S102-24-2,分别基于所述第二区域块和对应的所述背景区域块进行差值计算,生成所述第二差异图像。
此处,所述差值计算可以理解为计算第二区域块中的每个位置的像素值与第二背景图像中对应位置的像素值的差值。
步骤S102-25,基于预设二值化阈值和所述第二差异图像进行二值化处理,生成所述第三图像。
本公开实施例通过提取ROI,减少补光后地面反射对图像分析的影响。同时,通过对图像进行分块处理,降低了计算的复杂度。
实施例四
由于本公开实施例是基于上述实施例进行进一步优化,基于相同方法以及相同名称含义的解释与上述实施例相同,此处不再赘述。
所述旋转或转弯停顿,包括以下步骤:
在旋转或转弯过程中,或者在周期性行走或停顿后,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
可选的,采集第一图像和采集第二图像的方向相同。
由于自行走设备在旋转或转弯过程中,随时都可能碰撞到障碍物。为了避免碰撞发生,本公开实施例使自行走设备每转动一定角度或一定时间就停顿下来,判断是否存在近场物体。从而进一步提高了旋转或转弯的安全性。
与本公开第一方面中提供的检测近场物体的方法相对应,在本公开的第二方面中,还提供了一种检测近场物体的装置。由于第二方面中的实施例基本相似于第一方面中的实施例,所以描述得比较简单,相关的部分请参见第一方面中的实施例的对应说明即可。下述描述的装置实施例仅仅是示意性的。
图5示出了本公开提供的一种检测近场物体的装置的实施例。
如图5所示,本公开提供一种检测近场物体的装置,包括:
采集单元501,用于采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像;
处理单元502,用于基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像;
分析单元503,用于基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
可选的,所述处理单元502,用于:
基于所述第一图像中的像素值进行均值计算,生成第一背景图像;
根据所述第二图像和所述第一背景图像进行差值计算,生成第一差异图像;
基于预设二值化阈值和所述第一差异图像进行二值化处理,生成所述第三图像。
可选的,所述处理单元502,用于:
基于预设兴趣区域从所述第一图像中获取第一区域图像;
基于所述第一区域图像中的像素值进行均值计算,生成第二背景图像;
基于所述预设兴趣区域从所述第二图像中获取第二区域图像;
根据所述第二区域图像和所述第二背景图像进行差值计算,生成第二差异图像;
基于预设二值化阈值和所述第二差异图像进行二值化处理,生成所述第三图像。
可选的,所述基于所述第一区域图像中的像素值进行均值计算,生成所述第二背景图像,包括:
基于预设块尺寸大小将所述第一区域图像分成多个第一区域块;
分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像,其中,所述第二背景图像包括与所述第一区域块位置相同的背景区域块。
可选的,所述根据所述第二区域图像和所述第二背景图像进行差值计算,生成所述第二差异图像,包括:
基于所述背景区域块的位置将所述第二区域图像分成多个对应所述背景区域块的第二区域块;
分别基于所述第二区域块和对应的所述背景区域块进行差值计算,生成所述第二差异图像。
可选的,所述分析单元503,用于:
基于预设像素阈值获取所述第三图像中区域亮斑连通域的区域大小值;
当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
可选的,所述采集单元501,用于:
当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
可选的,所述采集单元501,还用于:在旋转或转弯之后或在旋转或转弯的过程中,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
本公开实施例利用补光灯补光前后自动曝光装置的特点,在补光灯补光前后对同一方向上拍摄两个图像,通过两个图像的对比确定是否存在近场物体。在不增加额外装置的情况下,利用现有装置完成了自行走设备发现近场物体的任务,避免了自行走设备与近场物体发生碰撞。
根据本公开的第三方面,还在实施例中提供了一种电子设备,该设备用于检测近场物体的方法。所述电子设备,包括:至少一个处理器;以及,与所述至少一个处理器通信连接的存储器;其中,
所述存储器存储有可被所述一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行如第一实施例所述检测近场物体的方法。
根据本公开的第四方面,还在实施例中提供了一种检测近场物体的计算机 存储介质。所述计算机存储介质存储有计算机可执行指令,该计算机可执行指令可执行如第一实施例中所述检测近场物体的方法。
下面参考图6,其示出了适于用来实现本公开实施例的电子设备的结构示意图。本公开实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图6示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图6所示,电子设备可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备与其他设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装 置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成 的技术方案。
此外,虽然采用特定次序描绘了各操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的各种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。
尽管已经采用特定于结构特征和/或方法逻辑动作的语言描述了本主题,但是应当理解所附权利要求书中所限定的主题未必局限于上面描述的特定特征或动作。相反,上面所描述的特定特征和动作仅仅是实现权利要求书的示例形式。

Claims (18)

  1. 一种检测近场物体的方法,包括:
    采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像;
    基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像;
    基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
  2. 根据权利要求1所述的方法,其中,所述基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像,包括:
    基于所述第一图像中的像素值的均值,生成第一背景图像;
    根据所述第二图像和所述第一背景图像,生成第一差异图像;
    基于预设二值化阈值对所述第一差异图像进行二值化处理,生成所述第三图像。
  3. 根据权利要求1所述的方法,其中,所述基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像,包括:
    从所述第一图像中获取第一区域图像;
    基于所述第一区域图像中的像素值的均值,生成第二背景图像;
    从所述第二图像中获取对应于所述第一区域图像的第二区域图像;
    根据所述第二区域图像和所述第二背景图像,生成第二差异图像;
    基于预设二值化阈值对所述第二差异图像进行二值化处理,生成所述第三图像。
  4. 根据权利要求3所述的方法,其中,所述基于所述第一区域图像中的像素值的均值,生成所述第二背景图像,包括:
    将所述第一区域图像分成多个第一区域块;
    分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像,其中,所述第二背景图像包括与所述多个第一区域块对应的多个背景区域块。
  5. 根据权利要求4所述的方法,其中,所述根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像,包括:
    基于所述背景区域块将所述第二区域图像分成多个对应所述背景区域块的第二区域块;
    分别基于所述第二区域块和对应的所述背景区域块,生成所述第二差异图像。
  6. 根据权利要求1所述的方法,其中,所述基于所述第三图像中区域亮斑 的连通域,确定是否存在近场物体,包括:
    获取所述第三图像中区域亮斑连通域的区域大小值;
    当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
  7. 根据权利要求1所述的方法,其中,所述采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像,包括:
    当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
  8. 根据权利要求1所述的方法,还包括:在旋转或转弯之后或在旋转或转弯的过程中,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
  9. 一种检测近场物体的装置,包括:
    采集单元,用于采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像;
    处理单元,用于基于所述第一图像和所述第二图像,生成包括区域亮斑的第三图像;
    分析单元,用于基于所述第三图像中区域亮斑的连通域,确定是否存在近场物体。
  10. 根据权利要求9所述的装置,其中,所述处理单元,用于:
    基于所述第一图像中的像素值的均值,生成第一背景图像;
    根据所述第二图像和所述第一背景图像,生成第一差异图像;
    基于预设二值化阈值对所述第一差异图像进行二值化处理,生成所述第三图像。
  11. 根据权利要求9所述的装置,其中,所述处理单元,用于:
    从所述第一图像中获取第一区域图像;
    基于所述第一区域图像中的像素值的均值,生成第二背景图像;
    从所述第二图像中获取对应于所述第一区域图像的第二区域图像;
    根据所述第二区域图像和所述第二背景图像,生成第二差异图像;
    基于预设二值化阈值对所述第二差异图像进行二值化处理,生成所述第三图像。
  12. 根据权利要求11所述的装置,其中,所述基于所述第一区域图像中的像素值的均值,生成所述第二背景图像,包括:
    将所述第一区域图像分成多个第一区域块;
    分别对每个第一区域块中的像素值进行均值计算,生成所述第二背景图像,其中,所述第二背景图像包括与所述多个第一区域块对应的多个背景区域块。
  13. 根据权利要求12所述的装置,其中,所述根据所述第二区域图像和所述第二背景图像,生成所述第二差异图像,包括:
    基于所述背景区域块将所述第二区域图像分成多个对应所述背景区域块的第二区域块;
    分别基于所述第二区域块和对应的所述背景区域块,生成所述第二差异图像。
  14. 根据权利要求9所述的装置,其中,所述分析单元,用于:
    获取所述第三图像中区域亮斑连通域的区域大小值;
    当所述区域大小值大于或等于预设区域大小阈值时,确定存在所述近场物体。
  15. 根据权利要求9所述的装置,其中,所述采集单元,用于:
    当启动所述补光灯补光且补光参数值调整时,采集所述第二图像。
  16. 根据权利要求9所述的装置,其中,所述采集单元,还用于:
    在旋转或转弯之后或在旋转或转弯的过程中,采集补光灯补光前的第一图像,以及启动所述补光灯补光时的第二图像。
  17. 一种计算机可读存储介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1至8中任一项所述的方法。
  18. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现如权利要求1至8中任一项所述的方法。
PCT/CN2021/100720 2020-12-30 2021-06-17 一种检测近场物体的方法、装置、介质和电子设备 WO2022142172A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/259,411 US20240071023A1 (en) 2020-12-30 2021-06-17 Method and apparatus for detecting near-field object, and medium and electronic device
EP21912930.1A EP4274215A1 (en) 2020-12-30 2021-06-17 Method and apparatus for detecting near-field object, and medium and electronic device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011619047.8 2020-12-30
CN202011619047.8A CN112804447B (zh) 2020-12-30 2020-12-30 一种检测近场物体的方法、装置、介质和电子设备

Publications (1)

Publication Number Publication Date
WO2022142172A1 true WO2022142172A1 (zh) 2022-07-07

Family

ID=75805949

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/100720 WO2022142172A1 (zh) 2020-12-30 2021-06-17 一种检测近场物体的方法、装置、介质和电子设备

Country Status (4)

Country Link
US (1) US20240071023A1 (zh)
EP (1) EP4274215A1 (zh)
CN (1) CN112804447B (zh)
WO (1) WO2022142172A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112804447B (zh) * 2020-12-30 2023-01-17 北京石头创新科技有限公司 一种检测近场物体的方法、装置、介质和电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105830428A (zh) * 2013-12-19 2016-08-03 株式会社理光 目标检测设备、移动体设备控制系统及其程序
US9654738B1 (en) * 2013-08-07 2017-05-16 Waymo Llc Using multiple exposures to improve image processing for autonomous vehicles
CN107493415A (zh) * 2017-09-21 2017-12-19 钱月珍 防背光摄像系统
CN108802742A (zh) * 2018-04-28 2018-11-13 北京集光通达科技股份有限公司 异常物体监测方法、装置及系统
CN112804447A (zh) * 2020-12-30 2021-05-14 北京石头世纪科技股份有限公司 一种检测近场物体的方法、装置、介质和电子设备

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI422946B (zh) * 2009-10-30 2014-01-11 Univ Nat Chiao Tung 照明控制模組、包含其之攝影機及照明控制方法
US9871979B2 (en) * 2012-02-24 2018-01-16 Karem Aircraft, Inc. Systems and methods for illumination and observation
CN103854009B (zh) * 2012-12-05 2017-12-29 联想(北京)有限公司 一种信息处理方法及电子设备
CN103440484B (zh) * 2013-09-12 2016-08-17 沈阳聚德视频技术有限公司 一种适应室外大空间的火焰检测方法
JP6292533B2 (ja) * 2013-12-06 2018-03-14 株式会社リコー 物体検出装置及びセンシング装置
CN104463253B (zh) * 2015-01-06 2018-02-02 电子科技大学 基于自适应背景学习的消防通道安全检测方法
CN106097317A (zh) * 2016-06-02 2016-11-09 南京康尼机电股份有限公司 一种基于离散余弦相位信息的多光斑检测和定位方法
CN107456172B (zh) * 2016-06-06 2019-12-31 北京小米移动软件有限公司 清洁机器人及障碍物跨越方法
CN106651801A (zh) * 2016-12-23 2017-05-10 Tcl集团股份有限公司 一种光斑定位时去除噪声的方法及系统
CN110824498A (zh) * 2018-08-07 2020-02-21 杭州海康机器人技术有限公司 障碍物检测方法、装置及系统
CN210377502U (zh) * 2019-09-26 2020-04-21 苏州立创致恒电子科技有限公司 一种屏蔽环境光干扰的成像组件
CN111121722A (zh) * 2019-12-13 2020-05-08 南京理工大学 结合激光点阵和偏振视觉的双目三维成像方法
CN111310575B (zh) * 2020-01-17 2022-07-08 腾讯科技(深圳)有限公司 一种人脸活体检测的方法、相关装置、设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9654738B1 (en) * 2013-08-07 2017-05-16 Waymo Llc Using multiple exposures to improve image processing for autonomous vehicles
CN105830428A (zh) * 2013-12-19 2016-08-03 株式会社理光 目标检测设备、移动体设备控制系统及其程序
CN107493415A (zh) * 2017-09-21 2017-12-19 钱月珍 防背光摄像系统
CN108802742A (zh) * 2018-04-28 2018-11-13 北京集光通达科技股份有限公司 异常物体监测方法、装置及系统
CN112804447A (zh) * 2020-12-30 2021-05-14 北京石头世纪科技股份有限公司 一种检测近场物体的方法、装置、介质和电子设备

Also Published As

Publication number Publication date
CN112804447A (zh) 2021-05-14
CN112804447B (zh) 2023-01-17
US20240071023A1 (en) 2024-02-29
EP4274215A1 (en) 2023-11-08

Similar Documents

Publication Publication Date Title
US20210209392A1 (en) Image Processing Method and Device, and Storage Medium
WO2019020103A1 (zh) 目标识别方法、装置、存储介质和电子设备
US20170169309A1 (en) Method and system to detect objects using block based histogram of oriented gradients
CN111222509B (zh) 目标检测方法、装置及电子设备
CN113607185B (zh) 车道线信息显示方法、装置、电子设备和计算机可读介质
US20230336878A1 (en) Photographing mode determination method and apparatus, and electronic device and storage medium
WO2022142172A1 (zh) 一种检测近场物体的方法、装置、介质和电子设备
CN111382695A (zh) 用于检测目标的边界点的方法和装置
WO2024016715A1 (zh) 检测系统的成像一致性的方法、装置和计算机存储介质
CN111967332A (zh) 用于自动驾驶的能见度信息生成方法和装置
CN111783632A (zh) 针对视频流的人脸检测方法、装置、电子设备及存储介质
CN110852242A (zh) 基于多尺度网络的水印识别方法、装置、设备及存储介质
CN115565158A (zh) 车位检测方法、装置、电子设备和计算机可读介质
CN115409985A (zh) 目标对象检测方法、装置、电子设备及可读存储介质
CN110634155A (zh) 一种基于深度学习的目标检测方法和装置
CN113099101B (zh) 摄像参数调节方法、装置及电子设备
CN113435393A (zh) 森林火灾烟雾根节点检测方法、装置和设备
CN112037280A (zh) 物体距离测量方法及装置
WO2022194157A1 (zh) 一种目标跟踪方法、装置、设备及介质
CN110991312A (zh) 生成检测信息的方法、装置、电子设备和介质
CN114359673B (zh) 基于度量学习的小样本烟雾检测方法、装置和设备
CN112668474B (zh) 平面生成方法和装置、存储介质和电子设备
CN115817459B (zh) 车辆控制方法、装置、电子设备和计算机可读介质
CN111815656B (zh) 视频处理方法、装置、电子设备和计算机可读介质
CN112818748B (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: 21912930

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18259411

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2021912930

Country of ref document: EP

Effective date: 20230731