WO2017067390A1 - Method and terminal for obtaining depth information of low-texture regions in image - Google Patents

Method and terminal for obtaining depth information of low-texture regions in image Download PDF

Info

Publication number
WO2017067390A1
WO2017067390A1 PCT/CN2016/101602 CN2016101602W WO2017067390A1 WO 2017067390 A1 WO2017067390 A1 WO 2017067390A1 CN 2016101602 W CN2016101602 W CN 2016101602W WO 2017067390 A1 WO2017067390 A1 WO 2017067390A1
Authority
WO
WIPO (PCT)
Prior art keywords
region
weak texture
image
point
depth value
Prior art date
Application number
PCT/CN2016/101602
Other languages
French (fr)
Chinese (zh)
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 努比亚技术有限公司
Publication of WO2017067390A1 publication Critical patent/WO2017067390A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Definitions

  • the present invention relates to the field of image processing, and in particular, to a method and a terminal for acquiring depth information of a weak texture region in an image.
  • Stereo matching is a core algorithm in stereo vision.
  • the processing of weak texture regions has always been a difficult point.
  • the pixels of weak texture regions are similar in color and brightness.
  • the matching of the pixel points brings singularity, and the stereo matching algorithm is easy to mismatch, so that the depth information of the obtained weak texture region is not accurate.
  • the embodiment of the present invention is to provide a method and a terminal for acquiring a depth information of a weak texture region in an image, which can accurately obtain depth information of a weak texture region.
  • a terminal comprising:
  • An image segmentation module configured to acquire color and brightness information of an image, and divide the image into a plurality of regions according to the color and brightness information;
  • a weak texture region acquiring module configured to calculate gradient information corresponding to the image, and select a weak texture region from the regions segmented by the image segmentation module according to the gradient information, where the weak texture region is a gradient statistical average An area within a preset range;
  • An edge depth obtaining module configured to extract boundary pixel points of the weak texture region selected by the weak texture region acquiring module, and obtain a depth value of the boundary pixel point;
  • a region depth obtaining module configured to acquire a boundary image obtained by the module according to the edge depth The depth value of the prime point, and the depth value of each pixel in the weak texture region is calculated.
  • the weak texture region obtaining module is further configured to: obtain gradient information corresponding to the image according to a gradient algorithm, where the gradient information is a gradient corresponding to each pixel in the image; and calculate the image.
  • the gradient statistical average corresponding to the pixel points in the segmentation region is selected, and the region in which the gradient statistical average value is within the preset range is a weak texture region.
  • the region depth obtaining module is further configured to: screen out a sudden change point in the boundary pixel point according to a depth value of the boundary pixel point, to obtain a reliable point in the boundary pixel point;
  • the depth value of the point is plane-fitted, and the depth value of each pixel in the weak texture area is calculated.
  • the image segmentation module is further configured to divide the image into a plurality of regions by using a region-based segmentation method, a threshold-based segmentation method, an edge-based segmentation method, or a cluster analysis method.
  • the image segmentation module is further configured to select a plurality of seed pixels, and divide a new pixel point around the seed pixel that meets a preset condition into an area where the seed pixel is located, and the new pixel
  • the point is regarded as a new seed pixel
  • the new pixel point satisfying the preset condition around the new seed pixel is further divided into an area where the seed pixel is located until the new seed pixel does not exist. Determining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that the difference between the color and the luminance information is at a first threshold compared to the seed pixel Inside.
  • the edge depth acquiring module is further configured to perform area marking on the weak texture area to obtain the marked weak texture area, and then binarize the marked weak texture area and other areas of the image.
  • Obtaining a weakly textured region after binarization performing the cavity filling of the binarized weakly textured region to obtain a weakly textured region after the cavity is filled, and performing contour extraction on the weakly textured region after the cavity is filled to obtain the a contour line of the weak texture region, and acquiring a boundary pixel point of the weak texture region according to the contour line of the weak texture region; Calculating the depth value Z of the boundary pixel:
  • f is the focal length of two digital cameras in the stereoscopic imaging device
  • T is the spacing between the two digital cameras
  • d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  • the area mark refers to: making the continuous area the same mark
  • the edge depth obtaining module is further configured to perform a region marking on the weak texture region to obtain a marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
  • the edge depth acquiring module is further configured to adopt a region hole filling algorithm, and the binarized weak texture region is filled with the region hole to obtain the weak texture region after the cavity filling.
  • the edge depth acquiring module is further configured to apply a stereo matching algorithm to obtain a depth value of the boundary pixel.
  • the depth value of the maximum inner point set is a depth value of a reliable point in the boundary pixel point
  • the remaining value in the sample set P is a depth value of a sudden change point in the boundary pixel point
  • the n and N Is the default value.
  • a method for acquiring depth information of a weak texture region in an image comprising:
  • the calculating obtains the gradient information corresponding to the image, and selects the weak texture region from the plurality of regions according to the gradient information, including:
  • the calculating, according to the depth value of the boundary pixel, the depth value of each pixel in the weak texture region including:
  • the dividing the image into a plurality of regions according to the color and brightness information includes:
  • the image is segmented into a plurality of regions using a region-based segmentation method, a threshold-based segmentation method, or an edge-based segmentation method or a cluster analysis method.
  • the region-based segmentation method is used to divide the image into several regions, including:
  • the extracting the boundary pixel of the weak texture region and acquiring the depth value of the boundary pixel includes:
  • the weakened texture region is filled with the region to obtain the weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the contour of the weakly textured region, according to the weak texture region
  • the contour line acquires a boundary pixel point of the weak texture region; and calculates a depth value Z of the boundary pixel point according to the following formula:
  • f is the focal length of two digital cameras in the stereoscopic imaging device
  • T is the spacing between the two digital cameras
  • d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  • the area mark refers to: making the continuous area the same mark
  • the weak texture region is region-marked to obtain the marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
  • the null-textured region of the binarized weakly textured region is filled with a cavity to obtain a weakly textured region after the cavity is filled, including:
  • the area void filling algorithm is used to fill the weakly textured area of the binarized area to obtain the weakly textured area after the cavity is filled.
  • the obtaining the depth value of the boundary pixel includes:
  • a stereo matching algorithm is applied to obtain a depth value of the boundary pixel.
  • the filtering out the abrupt point in the boundary pixel according to the depth value of the boundary pixel to obtain a reliable point in the boundary pixel including:
  • the residual set SC P
  • the depth value of the boundary pixel point in the ⁇ S with the initialization model M whose error is less than the second threshold is divided into inner point sets; when the number of inner point concentration depth values reaches N, the least square method is used according to the inner point set.
  • An embodiment of the present invention provides a method and a terminal for acquiring depth information of a weak texture region in an image, where the terminal divides an image into a plurality of image segmentation regions; and obtains a weak texture region according to the gradient statistical detection; and extracts the weak texture region.
  • a boundary pixel applying a stereo matching algorithm to obtain a depth value of the boundary pixel; and filtering a sudden change point in the boundary pixel according to the depth value of the boundary pixel to obtain a reliable point in the boundary pixel And performing a plane fitting on the depth value of the reliable point to calculate a depth value of each pixel in the weak texture region.
  • the method of the present embodiment Compared with the depth value of each pixel in the weak texture region, the method of the present embodiment performs plane fitting according to the depth value of the selected reliable point, and estimates the weak texture region.
  • the depth value of each pixel point can reduce the error probability of the depth value estimation of the weak texture region, and accurately obtain the depth information of the weak texture region.
  • FIG. 1 is a schematic structural diagram of hardware of a mobile terminal that implements various embodiments of the present invention
  • FIG. 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in FIG. 1;
  • FIG. 3 is a structural block diagram of a terminal according to Embodiment 1 of the present invention.
  • FIG. 5 is a diagram of identifying, by using a plurality of color blocks, a plurality of image segmentation regions after the image shown in FIG. 4 is segmented according to an embodiment of the present invention
  • FIG. 6 is an image showing a weak texture area according to an embodiment of the present invention.
  • FIG. 7 is an image obtained by binarizing a weak texture region according to an embodiment of the present invention.
  • FIG. 8 is an image of a binarized image shown in FIG. 7 after being filled in a cavity according to an embodiment of the present invention
  • FIG. 9 is an image obtained by performing contour extraction on a hole-filled image shown in FIG. 8 according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of plane fitting of a depth value of a reliable point according to an embodiment of the present invention.
  • FIG. 11 is a depth image obtained by applying an existing method according to an embodiment of the present invention.
  • FIG. 12 is a depth image obtained by applying the method according to an embodiment of the present invention.
  • FIG. 13 is a schematic flowchart diagram of a method for acquiring depth information of a weak texture region in an image according to Embodiment 2 of the present invention.
  • the mobile terminal can be implemented in various forms.
  • the terminal described in the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, and a personal digital assistant.
  • PDAs tablet computers
  • PMPs portable multimedia players
  • navigation devices and the like
  • fixed terminals such as digital TVs, desktop computers, and the like.
  • the terminal is a mobile terminal.
  • those skilled in the art will appreciate that configurations in accordance with embodiments of the present invention can be applied to fixed type terminals in addition to components that are specifically for mobile purposes.
  • FIG. 1 is a schematic diagram showing the hardware structure of a mobile terminal embodying various embodiments of the present invention.
  • the mobile terminal 100 may include a wireless communication unit 110, an audio/video (A/V) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190. and many more.
  • Figure 1 shows a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead, and the components of the mobile terminal will be described in detail below. .
  • Wireless communication unit 110 typically includes one or more components that permit radio communication between mobile terminal 100 and a wireless communication system or network.
  • the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
  • the broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel.
  • the broadcast channel can include a satellite channel and/or a terrestrial channel.
  • the broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to the terminal.
  • the broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like.
  • the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal.
  • the broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112.
  • the broadcast signal may exist in various forms, for example, it may exist in the form of Digital Multimedia Broadcasting (DMB) Electronic Program Guide (EPG), Digital Video Broadcasting Handheld (DVB-H) Electronic Service Guide (ESG), and the like.
  • Broadcast receiving module The signal broadcast can be received by using various types of broadcast systems.
  • the broadcast receiving module 111 can use forward link media (Media) such as Multimedia Broadcast-Ground (DMB-T), Digital Multimedia Broadcast-Satellite (DMB-S), Digital Video Broadcast-Handheld (DVB-H) Digital broadcasting systems such as FLO@) data broadcasting systems, terrestrial digital broadcasting integrated services (ISDB-T), etc. receive digital broadcasting.
  • Media such as Multimedia Broadcast-Ground (DMB-T), Digital Multimedia Broadcast-Satellite (DMB-S), Digital Video Broadcast-Handheld (DVB-H) Digital broadcasting systems such as FLO@) data broadcasting systems, terrestrial digital broadcasting integrated services (ISDB-T), etc. receive digital
  • the mobile communication module 112 transmits the radio signals to and/or receives radio signals from at least one of a base station (e.g., an access point, a Node B, etc.), an external terminal, and a server.
  • a base station e.g., an access point, a Node B, etc.
  • Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received in accordance with text and/or multimedia messages.
  • the wireless internet module 113 supports wireless internet access of the mobile terminal.
  • the module can be internally or externally coupled to the terminal.
  • the wireless Internet access technologies involved in the module may include Wireless Local Area Network (WLAN) (Wi-Fi), Wireless Broadband (Wibro), Worldwide Interoperability for Microwave Access (Wimax), High Speed Downlink Packet Access (HSDPA), and the like. .
  • WLAN Wireless Local Area Network
  • Wibro Wireless Broadband
  • Wimax Worldwide Interoperability for Microwave Access
  • HSDPA High Speed Downlink Packet Access
  • the short range communication module 114 is a module for supporting short range communication.
  • Some examples of short-range communication technologies include BluetoothTM, Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wideband (UWB), ZigbeeTM, and the like.
  • the location information module 115 is a module for checking or acquiring location information of the mobile terminal.
  • a typical example of a location information module is the Global Positioning System (GPS).
  • GPS Global Positioning System
  • the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information to accurately calculate three-dimensional current position information based on longitude, latitude, and altitude.
  • the method for calculating position and time information uses three satellites and corrects the calculated position and time information errors by using another satellite.
  • the GPS module 115 is capable of calculating speed information by continuously calculating current position information in real time.
  • the A/V input unit 120 is for receiving an audio or video signal.
  • the A/V input unit 120 may include a camera 121 and a microphone 122 that processes image data of still pictures or video obtained by the image capturing device in a video capturing mode or an image capturing mode.
  • the processed image frame can be displayed on the display unit 151.
  • the image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the configuration of the mobile terminal.
  • the microphone 122 can receive sound (audio data) via a microphone in an operation mode of a telephone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound as audio data.
  • the processed audio (voice) data can be converted to a format output that can be transmitted to the mobile communication base station via the mobile communication module 112 in the case of a telephone call mode.
  • the microphone 122 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated during the process of receiving and transmitting audio signals.
  • the user input unit 130 may generate key input data according to a command input by the user to control various operations of the mobile terminal.
  • the user input unit 130 allows the user to input various types of information, and may include a keyboard, a pot, a touch pad (eg, a touch sensitive component that detects changes in resistance, pressure, capacitance, etc. due to contact), a scroll wheel , rocker, etc.
  • a touch screen can be formed.
  • the sensing unit 140 detects the current state of the mobile terminal 100 (eg, the open or closed state of the mobile terminal 100), the location of the mobile terminal 100, the presence or absence of contact (ie, touch input) by the user with the mobile terminal 100, and the mobile terminal.
  • the sensing unit 140 can sense whether the slide type phone is turned on or off.
  • the sensing unit 140 can detect whether the power supply unit 190 provides power or whether the interface unit 170 is coupled to an external device.
  • Sensing unit 140 may include proximity sensor 141 which will be described below in connection with a touch screen.
  • the interface unit 170 serves as an interface through which at least one external device can connect with the mobile terminal 100.
  • the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, and an audio input/output. (I/O) port, video I/O port, headphone port, and more.
  • the identification module may be stored to verify various information used by the user using the mobile terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identity Module (USIM), and the like.
  • the device having the identification module may take the form of a smart card, and thus the identification device may be connected to the mobile terminal 100 via a port or other connection device.
  • the interface unit 170 can be configured to receive input from an external device (eg, data information, power, etc.) and transmit the received input to one or more components within the mobile terminal 100 or can be used at the mobile terminal and external device Transfer data between.
  • the interface unit 170 may function as a path through which power is supplied from the base to the mobile terminal 100 or may be used as a transmission of various command signals allowing input from the base to the mobile terminal 100 The path to the terminal.
  • Various command signals or power input from the base can be used as signals for identifying whether the mobile terminal is accurately mounted on the base.
  • Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner.
  • the output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
  • the display unit 151 can display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
  • UI user interface
  • GUI graphical user interface
  • the display unit 151 can be used as an input device and an output device.
  • the display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like.
  • LCD liquid crystal display
  • TFT-LCD thin film transistor LCD
  • OLED organic light emitting diode
  • a flexible display a three-dimensional (3D) display, and the like.
  • 3D three-dimensional
  • Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like.
  • TOLED Transparent Organic Light Emitting Diode
  • the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown) .
  • the touch screen can be used to detect touch input pressure as well as touch input position and touch input area.
  • the audio output module 152 can convert the audio data received by the wireless communication unit 110 or stored in the memory 160 when the mobile terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like.
  • the audio signal is output as sound.
  • the audio output module 152 can provide audio output (eg, call signal reception sound, message reception sound, etc.) associated with a particular function performed by the mobile terminal 100.
  • the audio output module 152 can include a speaker, a buzzer, and the like.
  • the alarm unit 153 can provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alert unit 153 can provide an output in a different manner to notify of the occurrence of an event. For example, the alarm unit 153 can provide an output in the form of vibrations, and when a call, message, or some other incoming communication is received, the alarm unit 153 can provide a tactile output (ie, vibration) to notify the user of it. By providing such a tactile output, the user is able to recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 can also provide an output of the notification event occurrence via the display unit 151 or the audio output module 152.
  • the memory 160 can store a software program that is processed and controlled by the controller 180. And so on, or data that has been output or is about to be output (for example, a phone book, a message, a still image, a video, etc.) can be temporarily stored. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
  • the memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like.
  • the mobile terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
  • the controller 180 typically controls the overall operation of the mobile terminal. For example, the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like.
  • the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180.
  • the controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
  • the power supply unit 190 receives external power or internal power under the control of the controller 180 and provides appropriate power required to operate the various components and components.
  • the various embodiments described herein can be implemented in a computer readable medium using, for example, computer software, hardware, or any combination thereof.
  • the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle.
  • implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation.
  • Software code can be used by The software application (or program) written in a suitable programming language is implemented, and the software code can be stored in the
  • the mobile terminal has been described in terms of its function.
  • a slide type mobile terminal among various types of mobile terminals such as a folding type, a bar type, a swing type, a slide type mobile terminal, and the like will be described as an example. Therefore, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
  • the mobile terminal 100 as shown in FIG. 1 may be configured to operate using a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
  • air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)). ), Global System for Mobile Communications (GSM), etc.
  • FDMA Frequency Division Multiple Access
  • TDMA Time Division Multiple Access
  • CDMA Code Division Multiple Access
  • UMTS Universal Mobile Telecommunications System
  • LTE Long Term Evolution
  • GSM Global System for Mobile Communications
  • a CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280.
  • the MSC 280 is configured to interface with a public switched telephone network (PSTN) 290.
  • PSTN public switched telephone network
  • the MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line.
  • the backhaul line can be constructed in accordance with any of a number of well known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL, or xDSL. It will be appreciated that the system as shown in FIG. 2 can include multiple BSCs 275.
  • Each BS 270 can serve one or more partitions (or regions), each of which is covered by a multi-directional antenna or an antenna directed to a particular direction radially away from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS 270 can be configured to support multiple frequency allocations, and each frequency allocation has a particular frequency spectrum (eg, 1.25 MHz, 5 MHz, etc.) Wait).
  • a particular frequency spectrum eg, 1.25 MHz, 5 MHz, etc.
  • BS 270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology.
  • BTS Base Transceiver Subsystem
  • the term "base station” can be used to generally refer to a single BSC 275 and at least one BS 270.
  • a base station can also be referred to as a "cell station.”
  • each partition of a particular BS 270 may be referred to as a plurality of cellular stations.
  • a broadcast transmitter (BT) 295 transmits a broadcast signal to the mobile terminal 100 operating within the system.
  • a broadcast receiving module 111 as shown in FIG. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295.
  • GPS Global Positioning System
  • the satellite 300 helps locate at least one of the plurality of mobile terminals 100.
  • a plurality of satellites 300 are depicted, but it is understood that useful positioning information can be obtained using any number of satellites.
  • the GPS module 115 as shown in Figure 1 is typically configured to cooperate with the satellite 300 to obtain desired positioning information. Instead of GPS tracking technology or in addition to GPS tracking technology, other techniques that can track the location of the mobile terminal can be used. Additionally, at least one GPS satellite 300 can selectively or additionally process satellite DMB transmissions.
  • BS 270 receives reverse link signals from various mobile terminals 100.
  • Mobile terminal 100 typically participates in calls, messaging, and other types of communications.
  • Each reverse link signal received by a particular base station 270 is processed within a particular BS 270.
  • the obtained data is forwarded to the relevant BSC 275.
  • the BSC provides call resource allocation and coordinated mobility management functions including a soft handoff procedure between the BSs 270.
  • the BSC 275 also routes the received data to the MSC 280, which provides additional routing services for interfacing with the PSTN 290.
  • PSTN 290 interfaces with MSC 280, which forms an interface with BSC 275, and BSC 275 controls BS 270 accordingly to transmit forward link signals to mobile terminal 100.
  • the embodiment of the present invention provides a terminal.
  • the terminal includes an image segmentation module 301, a weak texture region acquisition module 302, an edge depth acquisition module 303, and a region depth acquisition module 304.
  • the image segmentation module 301 is configured to acquire color and brightness information of the image, and divide the image into a plurality of regions according to the color and brightness information.
  • the image segmentation module 301 can segment the image according to the color and brightness information of the image.
  • the image segmentation module 301 may specifically apply a region-based segmentation method such as a region growing method to segment an image.
  • a region-based segmentation method such as a region growing method to segment an image.
  • the basic idea of region growing is to group pixels with similar properties to form regions. Specifically, a seed pixel is searched for each of the regions to be segmented as a starting point for growth, and then pixels in the periphery of the seed pixel having the same or similar properties as the seed pixel (in this embodiment, pixels having similar color and luminance information) ) merged into the area where the seed pixel is located. These new pixels are treated as new seed pixels to continue the above process until no more pixels satisfying the condition can be included. Such an area will grow.
  • the image segmentation module is further configured to select a plurality of seed pixels, divide a new pixel point satisfying the preset condition around the seed pixel point into an area where the seed pixel point is located, and treat the new pixel point as a new seed pixel, continuing to divide a new pixel point satisfying the preset condition around the new seed pixel to an area where the seed pixel point is located, until a preset condition does not exist around the new seed pixel point a pixel, obtaining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that a difference between the color and the luminance information is within a first threshold compared to the seed pixel.
  • the image segmentation module may further divide the image according to color and brightness information of the image by using a mean shift algorithm to acquire a plurality of regions.
  • Mean Shift algorithm is an effective statistical iterative algorithm.
  • Image segmentation based on Mean Shift algorithm is also a region-based segmentation method.
  • the analysis features are very similar and have strong adaptability and robustness. It is not sensitive to the smooth area of the image and the image texture area, so it can get good segmentation results.
  • This algorithm has been widely used in the field of computer vision and has achieved great success.
  • This embodiment may apply the Mean Shift algorithm to segment the image into a plurality of image segmentation regions according to color and luminance information.
  • C d is detected from the airspace. If any c i , c j ⁇ C d , i ⁇ j satisfies in the same bounding sphere in the feature space, the features are considered to be similar, and c i and c j are classified into one.
  • the class that is, after the above processing, the pixels that are finally clustered into the same class are divided into a region, so that the image is divided into several regions.
  • the image segmentation module 301 may further divide the image by using a threshold-based segmentation method, an edge-based segmentation method, a clustering segmentation method, or the like.
  • a threshold-based segmentation method an edge-based segmentation method, a clustering segmentation method, or the like.
  • the specific image segmentation method adopted is not limited herein.
  • the image segmentation module 301 performs image segmentation based on color and brightness information of the image.
  • the pixels inside the divided area are similar in color and brightness.
  • the image shown in FIG. 4 is segmented, and different image segmentation regions are represented by different color blocks, and the effect is as shown in FIG. 5.
  • the weak texture region obtaining module 302 is configured to calculate the gradient information corresponding to the image, and select a weak texture region from the regions segmented by the image segmentation module according to the gradient information, where the weak texture region is a gradient statistical average An area whose value is within the preset range.
  • the image can be regarded as a two-dimensional discrete function I(i,j), (i,j) is the coordinates of the pixel points in the image, and I(i,j) is the pixel value of the pixel point (i,j) (eg RGB) Value), the gradient information of the image is actually the derivation of this two-dimensional discrete function:
  • the gradient size of the image can reflect the brightness of the pixels of the image and the frequency change of the color.
  • the brightness of the internal pixel points is similar, the change is small, and the corresponding gradient value is relatively small.
  • the region in which the gradient statistical average is small is the weak texture region.
  • the weak texture region obtaining module 302 may calculate the gradient information corresponding to the image according to an existing gradient algorithm, that is, obtain a gradient corresponding to each pixel point in the image, and then obtain the weak texture region.
  • the module 302 may calculate a gradient statistical average value corresponding to the pixel points in the plurality of regions divided by the image segmentation module 301, and select a gradient statistical average value.
  • the area within the preset range is a weakly textured area.
  • the preset range is a range in which the gradient statistical average value is small, such as 0-10, which may be specifically determined according to actual conditions.
  • the three weak texture regions as illustrated in FIG. 6 can be obtained by the above-described processing of the weak texture region acquisition module 302.
  • the edge depth obtaining module 303 is configured to extract boundary pixel points of the weak texture region selected by the weak texture region obtaining module 302, and obtain a depth value of the boundary pixel point.
  • the edge depth obtaining module 303 is further configured to perform area marking on the weak texture area to obtain a marked weak texture area, and then binarize the marked weak texture area and other areas of the image to obtain a binary value.
  • a weak texture region after the binarized weak texture region is filled with the region to obtain a weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the weak texture region a contour line, the boundary pixel of the weak texture region is obtained according to the contour of the weak texture region; and the depth value Z of the boundary pixel is obtained according to the following formula:
  • f is the focal length of two digital cameras in the stereoscopic imaging device
  • T is the spacing between the two digital cameras
  • d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  • the area mark is to mark the continuous area with the same mark.
  • the common area mark method has four neighborhood mark algorithm and eight neighborhood mark algorithm.
  • Binarization is to set the gray value of the pixel on the image to 0 or 255, that is, to present the entire image with a distinct black and white visual effect.
  • the area mark is performed, that is, the weak texture area on the upper right of the image is marked as the area No. 1, and the other areas are marked as the area No. 2;
  • the marked weak texture region that is, the No. 1 region is binarized with the other region of the image, that is, the No. 2 region, as shown in FIG. 7, the weak texture located at the upper right of the image.
  • the area is displayed in white and the other areas in the image are displayed in black.
  • some of the pixels in the weak texture region are mistakenly considered to be not in the weak texture region, resulting in voids in the detected weak texture region, such as the black dots in the white region in FIG.
  • the edge depth acquisition module 303 uses the region hole filling algorithm to perform the region hole filling on the binarized weak texture region to obtain the void-filled weak texture region.
  • the image after the area filling is completed in the weak texture area is shown in Fig. 8.
  • the contour extraction can be performed on FIG. 8. Since the black and white contrast is clearly defined, the edge depth acquisition module 303 can easily extract the outline of the weak texture region, and the outline thereof is as shown by the line in FIG. The boundary pixel points of the weak texture region can be acquired according to the contour line of the weak texture region.
  • a stereo matching algorithm may be applied to obtain the depth value of the boundary pixel point.
  • the input of the stereo matching algorithm is an image acquired by a plurality of digital cameras of different viewing angles, and the output is a correspondence of points on the images.
  • c and c' are the optical centers of the two cameras
  • f is the focal length
  • T is the line connecting the two optical centers, that is, the spacing between the two digital cameras, also called the baseline.
  • a line that passes through the optical center and is perpendicular to the imaging plane is called the optical axis.
  • the so-called standard configuration means that the optical axes of the two cameras are perpendicular to the baseline and parallel to each other.
  • the focal lengths of the two cameras be equal to f, and the horizontal coordinate of the coordinate system of the camera is parallel to the baseline direction, then the point P in the space has the same vertical coordinate on the images formed by the two cameras.
  • This feature is also called stereoscopic vision.
  • the Epipolar Line (the so-called outer pole line refers to the intersection of the outer pole plane and the image plane, where the outer pole plane is a plane containing two focal points and spatial points).
  • images can be obtained in standard configuration by camera calibration and registration.
  • the image after P point projection to the two cameras is x and x', respectively, and x and x' are a pair of corresponding points. If x and x' are used to represent their horizontal coordinates, the correspondence between the two points can be described by the parallax defined as follows:
  • the parallax d is inversely proportional to the depth Z of the point of the space. Therefore, it is only necessary to know the parallax of the pixel to obtain the depth of the pixel.
  • the edge depth acquisition module 303 may obtain the disparity d of the boundary pixel points of the weak texture region using a stereo matching algorithm, and calculate the Z of the boundary pixel point of the weak texture region using the following formula:
  • the stereo matching algorithm is used to calculate the depth value of the pixel points in the weak texture region, since the pixels in the weak texture region are similar in color and brightness, this brings singularity to the matching of the pixel points, and the stereo matching algorithm is easy to apply. Mismatching, the depth information of the weak texture regions thus obtained is not accurate. However, for the boundary pixel points of the weak texture region, the pixel points inside the boundary pixel and the weak texture region are different in color and brightness, and the stereo matching algorithm is not easy to mismatch, so the boundary pixels of the obtained weak texture region are obtained. The depth value of the point is more accurate.
  • the area depth obtaining module 304 is configured to calculate a depth value of each pixel point in the weak texture area according to the depth value of the boundary pixel point acquired by the edge depth acquiring module 303.
  • the region depth obtaining module 304 may directly calculate the depth value of each pixel in the weak texture region according to the depth value of the boundary pixel point acquired by the edge depth acquiring module 303.
  • the regional depth obtaining module 304 is further configured to The depth value of the boundary pixel is filtered to remove the abrupt point in the boundary pixel to obtain a reliable point in the boundary pixel; the depth value of the reliable point is plane-fitted, and the weak texture region is calculated The depth value of each pixel.
  • the region depth obtaining module 304 may specifically filter out a sudden change point in the boundary pixel by using a RANSAC algorithm.
  • the RANSAC (RANdom SAmple Consensus) algorithm is an algorithm for calculating valid mathematical sample parameters based on a set of sample data sets containing abnormal data.
  • the RANSAC algorithm is often used in computer vision.
  • the basic assumption of the RANSAC algorithm is that the sample contains the correct data (inliers), which can be described by the model. It also contains outliers, that is, data that is far from the normal range and cannot adapt to the mathematical model, that is, the data set contains noise. These anomalous data may be due to erroneous measurements, incorrect assumptions, incorrect calculations, and the like. At the same time, RANSAC also assumes that given a correct set of data, there is a way to calculate the model parameters that match those data.
  • n is the minimum number of samples required to initialize the model parameters
  • P the number of samples of the set P#(P)>n, randomly extracted from P containing n a subset of P of the sample S initializes the model M;
  • S* is considered to be an inner set of points, which constitute a Consistus Set of S;
  • the region depth obtaining module 304 may perform plane fitting on the depth value of the reliable point to obtain a plane fitting equation, and the depth value of each pixel point in the weak texture region may be calculated by using the plane fitting equation.
  • a plane fitting diagram of the depth values of the boundary pixel points of a weak texture region it can be seen that the plane of the boundary point fitting covers the weak texture region, and the depth values of other pixels in the region are It can be calculated by the plane fitting equation.
  • each module unit in the terminal may be implemented by a central processing unit (CPU), a microprocessor (Micro Processor Unit, MPU), or a digital signal located in the terminal.
  • CPU central processing unit
  • MPU Micro Processor Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • FIG. 11 is a depth image obtained by applying the existing stereo matching algorithm
  • FIG. 12 is a depth image of a weak texture region obtained by applying the method provided by the embodiment, and a depth image of another region obtained by applying the existing stereo matching algorithm; It is seen that the depth map of the weakly textured region processed by the mark in Fig. 6 becomes smooth, and the correct rate is improved.
  • the terminal of the present embodiment can accurately obtain the depth information of the weak texture region, so that when the background image is blurred by the depth image, in the weak texture region, the depth value estimation of the weak texture region occurs due to the singularity of the stereo matching algorithm. Errors, the effect of background blur will be affected, and the blur effect will be unnatural.
  • the terminal of the embodiment can perform depth value estimation of the weak texture region, the error probability of the depth value estimation of the weak texture region can be reduced, and the background blur effect is better.
  • the target target region is estimated by the depth image
  • the target distance estimated by using the depth value of the singularity in the matching algorithm will be erroneous, and the depth value of the weak texture region is performed by using the terminal of the embodiment. It is estimated that the error probability of the depth value estimation of the weak texture region can be reduced, and the distance estimation of the target is more accurate; when the image segmentation is performed by using the depth image, if the target and the background both contain the texture region, the singularity in the matching algorithm is utilized. The area where the depth value is divided may be inaccurate.
  • the depth value estimation of the weak texture area by using the terminal of the embodiment may reduce the error probability of the depth value estimation of the weak texture area, so that the image segmentation area is more accurate.
  • An embodiment of the present invention provides a method for acquiring depth information of a weak texture region in an image. As shown in FIG. 13, the processing procedure of the method in this embodiment includes the following steps:
  • Step 1301 Acquire color and brightness information of an image, and divide the image into several regions according to the color and brightness information.
  • the terminal may apply a region-based segmentation method such as a region growing method to segment the image.
  • region growing is to group pixels with similar properties to form regions. Specifically, a seed pixel is searched for each of the regions to be segmented as a starting point for growth, and then pixels in the periphery of the seed pixel having the same or similar properties as the seed pixel (in this embodiment, pixels having similar color and luminance information) ) merged into the area where the seed pixel is located. These new pixels are treated as new seed pixels to continue the above process until no more pixels satisfying the condition can be included. Such an area will grow.
  • dividing the image into a plurality of regions according to the color and brightness information specifically: selecting a plurality of seed pixel points, and dividing a new pixel point satisfying a preset condition around the seed pixel point to the seed pixel point And treating the new pixel point as a new seed pixel, and continuing to divide a new pixel point satisfying the preset condition around the new seed pixel into an area where the seed pixel is located until the new There is no preset condition around the seed pixel a pixel, obtaining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that a difference between the color and the luminance information is within a first threshold compared to the seed pixel.
  • the terminal can also use the meanshift algorithm to segment the image according to the color and brightness information of the image to obtain several regions.
  • Mean Shift algorithm is an effective statistical iterative algorithm.
  • Image segmentation based on Mean Shift algorithm is also a region-based segmentation method. This segmentation method is very similar to the human eye's image analysis characteristics and has strong adaptability. Sex and robustness. It is not sensitive to the smooth area of the image and the image texture area, so it can get good segmentation results.
  • This algorithm has been widely used in the field of computer vision and has achieved great success.
  • This embodiment may apply the Mean Shift algorithm to segment the image into a plurality of image segmentation regions according to color and luminance information.
  • the terminal may also use a threshold-based segmentation method, an edge-based segmentation method, a cluster analysis method, and the like to divide the image, and the specific embodiment is adopted.
  • the image segmentation method is not limited here.
  • the terminal performs image segmentation based on the color and brightness information of the image, and the internal pixels of the segmented image segmentation region are similar in color and brightness.
  • the image shown in FIG. 4 is segmented, and different image segmentation regions are represented by different color blocks, and the effect is as shown in FIG. 5.
  • Step 1302 Calculate the gradient information corresponding to the image, and select a weak texture region from the plurality of regions according to the gradient information.
  • the weakly textured region is an area in which the gradient statistical average is within a preset range.
  • the image can be regarded as a two-dimensional discrete function I(i,j), (i,j) is the coordinates of the pixel points in the image, and I(i,j) is the pixel value of the pixel point (i,j) (eg RGB) Value), the gradient information of the image is actually the derivation of this two-dimensional discrete function:
  • the gradient size of the image can reflect the brightness of the pixels of the image and the frequency change of the color.
  • the brightness of the internal pixel points is similar, the change is small, and the corresponding gradient value is relatively small.
  • the region in which the gradient statistical average is small is the weak texture region.
  • the terminal may calculate the gradient information corresponding to the image according to a certain gradient algorithm, that is, obtain a gradient corresponding to each pixel in the image, and then calculate pixels in the image segmentation region.
  • the gradient statistical average corresponding to the point is selected as the weak texture region in the region where the gradient statistical average is within the preset range.
  • the preset range is a gradient statistical average value, such as 0-10, which can be defined according to the actual situation.
  • Step 1303 Extract boundary pixel points of the weak texture region, and obtain a depth value of the boundary pixel point.
  • the terminal may first perform area marking on the weak texture area to obtain the marked weak texture area, and then binarize the marked weak texture area and other areas of the image to obtain a binarized weak texture area, and The binarized weakly textured region is filled with the region to obtain a weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the contour of the weakly textured region, according to the weak Obtaining a boundary pixel of the weak texture region; calculating a depth of the boundary pixel according to the following formula Value Z:
  • f is the focal length of two digital cameras in the stereoscopic imaging device
  • T is the spacing between the two digital cameras
  • d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  • the area mark is to mark the continuous area with the same mark.
  • the common area mark method has four neighborhood mark algorithm and eight neighborhood mark algorithm.
  • Binarization is to set the gray value of the pixel on the image to 0 or 255, that is, to present the entire image with a distinct black and white visual effect.
  • the area mark is performed, that is, the weak texture area on the upper right of the image is marked as the area No. 1, and the other areas are marked as the area No. 2;
  • the marked weak texture region that is, the No. 1 region, is binarized with the other region of the image, that is, the No. 2 region.
  • the weakly textured region located at the upper right of the image is displayed in white, and other regions in the image are displayed. Displayed in black.
  • some of the pixels in the weak texture region are mistakenly considered to be not in the weak texture region, resulting in voids in the detected weak texture region, such as the black dots in the white region in FIG.
  • the terminal uses the region hole filling algorithm to perform the hole filling of the binarized weak texture region to obtain the weak texture region after the cavity filling.
  • the image after the area filling is completed in the weak texture area is shown in Fig. 8.
  • the contour extraction can be performed on FIG. 8. Since the black and white contrast is clearly defined, the terminal can easily extract the outline of the weak texture region, and the outline thereof is as shown by the line in FIG. The boundary pixel points of the weak texture region can be acquired according to the contour line of the weak texture region.
  • the obtaining the depth value of the boundary pixel includes: applying a stereo matching algorithm to obtain a depth value of the boundary pixel.
  • the input of the stereo matching algorithm is an image captured by a digital camera with different viewing angles, and the output is output. Is the correspondence of points on these images.
  • c and c' are the optical centers of the two cameras
  • f is the focal length
  • T is the line connecting the two optical centers, that is, the spacing between the two digital cameras, also called the baseline.
  • a line that passes through the optical center and is perpendicular to the imaging plane is called the optical axis.
  • the so-called standard configuration means that the optical axes of the two cameras are perpendicular to the baseline and parallel to each other.
  • the focal lengths of the two cameras be equal to f, and the horizontal coordinate of the coordinate system of the camera is parallel to the baseline direction, then the point P in the space has the same vertical coordinate on the images formed by the two cameras.
  • This feature is also called stereoscopic vision.
  • the Epipolar Line (the so-called outer pole line refers to the intersection of the outer pole plane and the image plane, where the outer pole plane is a plane containing two focal points and spatial points).
  • images can be obtained in standard configuration by camera calibration and registration.
  • the image after P point projection to the two cameras is x and x', respectively, and x and x' are a pair of corresponding points. If x and x' are used to represent their horizontal coordinates, the correspondence between the two points can be described by the parallax defined as follows:
  • the parallax d is inversely proportional to the depth Z of the point of the space. Therefore, it is only necessary to know the parallax of the pixel to obtain the depth of the pixel.
  • the terminal may obtain the disparity d of the boundary pixel points of the weak texture region using a stereo matching algorithm, and calculate the Z of the boundary pixel point of the weak texture region using the following formula:
  • the stereo matching algorithm is used to calculate the depth value of the pixel points in the weak texture region, since the pixels in the weak texture region are similar in color and brightness, this brings singularity to the matching of the pixel points, and the stereo matching algorithm is easy to apply. Mismatching, the depth information of the weak texture regions thus obtained is not accurate. However, for the boundary pixel points of the weak texture region, the pixel points inside the boundary pixel and the weak texture region are different in color and brightness, and the stereo matching algorithm is not easy to mismatch, so the boundary pixels of the obtained weak texture region are obtained. The depth value of the point is more accurate.
  • Step 1304 Calculate a depth value of each pixel in the weak texture region according to the depth value of the boundary pixel.
  • the terminal may directly calculate the depth value of each pixel in the weak texture region according to the depth value of the acquired boundary pixel.
  • the terminal may screen according to the depth value of the boundary pixel point.
  • a reliable point in the boundary pixel is obtained; the depth value of the reliable point is plane-fitted, and the depth value of each pixel in the weak texture region is calculated.
  • the filtering the abrupt point in the boundary pixel according to the depth value of the boundary pixel includes: filtering the boundary pixel by using a RANSAC algorithm according to the depth value of the boundary pixel The point of mutation.
  • the RANSAC algorithm is an algorithm that calculates the mathematical model parameters of the data based on a set of sample data sets containing abnormal data and obtains valid sample data.
  • the RANSAC algorithm is often used in computer vision.
  • the basic assumption of the RANSAC algorithm is that the sample contains the correct data (inliers), which can be described by the model. It also contains outliers, that is, data that is far from the normal range and cannot adapt to the mathematical model, that is, the data set contains noise. These anomalous data may be due to erroneous measurements, incorrect assumptions, incorrect calculations, and the like. At the same time, RANSAC also assumes that given a correct set of data, there is a way to calculate the model parameters that match those data.
  • n is the minimum number of samples required to initialize the model parameters
  • P the number of samples of the set P#(P)>n, randomly extracted from P containing n a subset of P of the sample S initializes the model M;
  • S* is considered to be an inner set of points, which constitute a Consistus Set of S;
  • the terminal may use the depth value of the boundary pixel as the sample set P, randomly extract the depth value of the n boundary pixel points from the sample set P as the subset S, and obtain the initialization model by plane fitting.
  • a depth value of the maximum inner point set is a depth value of a reliable point in the boundary pixel point
  • a remaining value in the sample set P is a depth value of a sudden change point in the boundary pixel point
  • the n sum N is the default value.
  • n is a preset value, which can be 60%-80% of the number of sample points in P
  • the N value is also a preset value, which can be 90% of the number of sample points in P.
  • the terminal may perform plane fitting on the depth value of the reliable point to obtain a plane fitting equation, and the depth value of each pixel in the weak texture region may be calculated by using the plane fitting equation.
  • a plane fitting diagram of the depth values of the boundary pixel points of a weak texture region it can be seen that the plane of the boundary point fitting covers the weak texture region, and the depth values of other pixels in the region are It can be calculated by the plane fitting equation.
  • FIG. 11 is a depth image obtained by applying the existing stereo matching algorithm
  • FIG. 12 is a depth image of a weak texture region obtained by applying the method provided by the embodiment, and a depth image of another region obtained by applying the existing stereo matching algorithm; It is seen that the depth map of the weakly textured region processed by the mark in Fig. 6 becomes smooth, and the correct rate is improved.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Abstract

A terminal and a method for obtaining depth information of the low-texture region in an image, the terminal comprising: an image segmentation module (301) configured to obtain the color and brightness information of the image, and to segment the image into a plurality of regions according to the color and brightness information; a low-texture region obtaining module (302) configured to calculate and obtain the gradient information corresponding to the image, and to select, according to the gradient information, a low-texture region from a plurality of regions segmented by the image segmentation module, the low-texture region being a region in which the statistical average gradient is within a preset range; an edge depth obtaining module (303) configured to extract boundary pixel points of the low-texture region selected by the low-texture region obtaining module (302), and to obtain the depth values of the boundary pixel points; and a region depth obtaining module (304) configured to calculate the depth value of each of the pixel points in the low-texture region according to the boundary pixel point depth value obtained by the edge depth obtaining module (303).

Description

图像中弱纹理区域的深度信息获取方法及终端Method and terminal for acquiring depth information of weak texture region in image 技术领域Technical field
本发明涉及图像处理领域,尤其涉及一种图像中弱纹理区域的深度信息获取方法及终端。The present invention relates to the field of image processing, and in particular, to a method and a terminal for acquiring depth information of a weak texture region in an image.
背景技术Background technique
立体匹配是立体视觉中的一个核心算法,在立体匹配算法中,弱纹理区域的处理一直是其中的一个难点,很多应用场景中,弱纹理区域的像素点在颜色和亮度上比较相似,这就给像素点的匹配带来了奇异性,应用立体匹配算法容易误匹配,这样获取的弱纹理区域的深度信息就不准确。Stereo matching is a core algorithm in stereo vision. In the stereo matching algorithm, the processing of weak texture regions has always been a difficult point. In many application scenarios, the pixels of weak texture regions are similar in color and brightness. The matching of the pixel points brings singularity, and the stereo matching algorithm is easy to mismatch, so that the depth information of the obtained weak texture region is not accurate.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种图像中弱纹理区域的深度信息获取方法及终端,可以准确获取弱纹理区域的深度信息。In view of this, the embodiment of the present invention is to provide a method and a terminal for acquiring a depth information of a weak texture region in an image, which can accurately obtain depth information of a weak texture region.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, the technical solution of the present invention is achieved as follows:
一种终端,包括:A terminal comprising:
图像分割模块,配置为获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域;An image segmentation module configured to acquire color and brightness information of an image, and divide the image into a plurality of regions according to the color and brightness information;
弱纹理区域获取模块,配置为计算获得所述图像对应的梯度信息,根据所述梯度信息从所述图像分割模块分割的若干区域中选取出弱纹理区域,所述弱纹理区域为梯度统计平均值在预设范围内的区域;a weak texture region acquiring module configured to calculate gradient information corresponding to the image, and select a weak texture region from the regions segmented by the image segmentation module according to the gradient information, where the weak texture region is a gradient statistical average An area within a preset range;
边缘深度获取模块,配置为提取所述弱纹理区域获取模块选取的弱纹理区域的边界像素点,获取所述边界像素点的深度值;An edge depth obtaining module, configured to extract boundary pixel points of the weak texture region selected by the weak texture region acquiring module, and obtain a depth value of the boundary pixel point;
区域深度获取模块,配置为根据所述边缘深度获取模块获取的边界像 素点的深度值,计算出所述弱纹理区域中各像素点的深度值。a region depth obtaining module configured to acquire a boundary image obtained by the module according to the edge depth The depth value of the prime point, and the depth value of each pixel in the weak texture region is calculated.
上述方案中,所述弱纹理区域获取模块,还配置为根据梯度算法计算获得所述图像对应的梯度信息,所述梯度信息为所述图像中各个像素点对应的梯度;计算出所述若干图像分割区域内像素点对应的梯度统计平均值,选取梯度统计平均值在预设范围内的区域为弱纹理区域。In the above solution, the weak texture region obtaining module is further configured to: obtain gradient information corresponding to the image according to a gradient algorithm, where the gradient information is a gradient corresponding to each pixel in the image; and calculate the image. The gradient statistical average corresponding to the pixel points in the segmentation region is selected, and the region in which the gradient statistical average value is within the preset range is a weak texture region.
上述方案中,所述区域深度获取模块,还配置为根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。In the above solution, the region depth obtaining module is further configured to: screen out a sudden change point in the boundary pixel point according to a depth value of the boundary pixel point, to obtain a reliable point in the boundary pixel point; The depth value of the point is plane-fitted, and the depth value of each pixel in the weak texture area is calculated.
上述方案中,所述图像分割模块,还配置为采用基于区域的分割方法、或者基于阈值的分割方法、或者基于边缘的分割方法、或者聚类分析方法,将所述图像分割为若干区域。In the above solution, the image segmentation module is further configured to divide the image into a plurality of regions by using a region-based segmentation method, a threshold-based segmentation method, an edge-based segmentation method, or a cluster analysis method.
上述方案中,所述图像分割模块,还配置为选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。In the above solution, the image segmentation module is further configured to select a plurality of seed pixels, and divide a new pixel point around the seed pixel that meets a preset condition into an area where the seed pixel is located, and the new pixel The point is regarded as a new seed pixel, and the new pixel point satisfying the preset condition around the new seed pixel is further divided into an area where the seed pixel is located until the new seed pixel does not exist. Determining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that the difference between the color and the luminance information is at a first threshold compared to the seed pixel Inside.
上述方案中,所述边缘深度获取模块,还配置为对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的边界像素点;按照以下公 式计算获取所述边界像素点的深度值Z:In the above solution, the edge depth acquiring module is further configured to perform area marking on the weak texture area to obtain the marked weak texture area, and then binarize the marked weak texture area and other areas of the image. Obtaining a weakly textured region after binarization, performing the cavity filling of the binarized weakly textured region to obtain a weakly textured region after the cavity is filled, and performing contour extraction on the weakly textured region after the cavity is filled to obtain the a contour line of the weak texture region, and acquiring a boundary pixel point of the weak texture region according to the contour line of the weak texture region; Calculating the depth value Z of the boundary pixel:
Figure PCTCN2016101602-appb-000001
Figure PCTCN2016101602-appb-000001
其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
上述方案中,所述区域标记是指:把连续区域作同一个标记;In the above solution, the area mark refers to: making the continuous area the same mark;
所述边缘深度获取模块,还配置为采用四邻域标记算法或者八邻域标记算法,对所述弱纹理区域进行区域标记获得标记后的弱纹理区域。The edge depth obtaining module is further configured to perform a region marking on the weak texture region to obtain a marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
上述方案中,所述边缘深度获取模块,还配置为采用区域空洞填充算法,将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。In the above solution, the edge depth acquiring module is further configured to adopt a region hole filling algorithm, and the binarized weak texture region is filled with the region hole to obtain the weak texture region after the cavity filling.
上述方案中,所述边缘深度获取模块,还配置为应用立体匹配算法获取所述边界像素点的深度值。In the foregoing solution, the edge depth acquiring module is further configured to apply a stereo matching algorithm to obtain a depth value of the boundary pixel.
上述方案中,所述区域深度获取模块,还配置为将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集;当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重复以上过程;在重复一定次数后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。In the above solution, the area depth obtaining module is further configured to use the depth value of the boundary pixel as the sample set P, and randomly extract the depth values of the n boundary pixels from the sample set P as the subset S, and pass the The plane fitting obtains the initialization model M; the depth value of the boundary pixel points in the residual set SC=P\S and the error of the initialization model M is less than the second threshold is divided into inner point sets; when the inner point concentrates the number of depth values When N is reached, the new model M* is recalculated according to the inner point set by least squares method; the new subset S* is re-randomly extracted, and the above process is repeated; after repeating a certain number of times, the obtained maximum inner point set is selected. The depth value of the maximum inner point set is a depth value of a reliable point in the boundary pixel point, and the remaining value in the sample set P is a depth value of a sudden change point in the boundary pixel point, the n and N Is the default value.
一种图像中弱纹理区域的深度信息获取方法,所述方法包括:A method for acquiring depth information of a weak texture region in an image, the method comprising:
获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域; Obtaining color and brightness information of the image, and dividing the image into a plurality of regions according to the color and brightness information;
计算获得所述图像对应的梯度信息,根据所述梯度信息从所述若干区域中选取出弱纹理区域,所述弱纹理区域为梯度统计平均值在预设范围内的区域;Obtaining gradient information corresponding to the image, and selecting a weak texture region from the plurality of regions according to the gradient information, where the weak texture region is an area in which a gradient statistical average value is within a preset range;
提取所述弱纹理区域的边界像素点,获取所述边界像素点的深度值;Extracting boundary pixel points of the weak texture region, and acquiring a depth value of the boundary pixel point;
根据所述边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值。Determining a depth value of each pixel in the weak texture region according to the depth value of the boundary pixel.
上述方案中,所述计算获得所述图像对应的梯度信息,根据所述梯度信息从所述若干区域中选取出弱纹理区域,包括:In the above solution, the calculating obtains the gradient information corresponding to the image, and selects the weak texture region from the plurality of regions according to the gradient information, including:
根据梯度算法计算获得所述图像对应的梯度信息,所述梯度信息为所述图像中各个像素点对应的梯度;Obtaining gradient information corresponding to the image according to a gradient algorithm, where the gradient information is a gradient corresponding to each pixel point in the image;
计算出所述若干图像分割区域内像素点对应的梯度统计平均值,选取梯度统计平均值在预设范围内的区域为弱纹理区域。Calculating a gradient statistical average corresponding to the pixel points in the plurality of image segmentation regions, and selecting a region in which the gradient statistical average value is within the preset range is a weak texture region.
上述方案中,所述根据所述边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值,包括:In the above solution, the calculating, according to the depth value of the boundary pixel, the depth value of each pixel in the weak texture region, including:
根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。And filtering a sudden change point in the boundary pixel point according to the depth value of the boundary pixel point to obtain a reliable point in the boundary pixel point; performing plane fitting on the depth value of the reliable point to calculate the weak point The depth value of each pixel in the texture area.
上述方案中,所述根据所述颜色与亮度信息,将所述图像分割为若干区域,包括:In the above solution, the dividing the image into a plurality of regions according to the color and brightness information includes:
采用基于区域的分割方法、或者基于阈值的分割方法、或者基于边缘的分割方法、或者聚类分析方法,将所述图像分割为若干区域。The image is segmented into a plurality of regions using a region-based segmentation method, a threshold-based segmentation method, or an edge-based segmentation method or a cluster analysis method.
上述方案中,所述采用基于区域的分割方法,将所述图像分割为若干区域,包括:In the above solution, the region-based segmentation method is used to divide the image into several regions, including:
选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素 点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。Selecting a plurality of seed pixels, dividing a new pixel point satisfying a preset condition around the seed pixel point into an area where the seed pixel point is located, and treating the new pixel point as a new seed pixel Pointing, continuing to divide a new pixel point satisfying the preset condition around the new seed pixel to an area where the seed pixel point is located, until there is no pixel point satisfying the preset condition around the new seed pixel point, Obtaining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that a difference between the color and the luminance information is within a first threshold compared to the seed pixel.
上述方案中,所述提取所述弱纹理区域的边界像素点,获取所述边界像素点的深度值,包括:In the above solution, the extracting the boundary pixel of the weak texture region and acquiring the depth value of the boundary pixel includes:
对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的边界像素点;按照以下公式计算获取所述边界像素点的深度值Z:Performing area marking on the weak texture area to obtain the marked weak texture area, and then binarizing the marked weak texture area and other areas of the image to obtain a binarized weak texture area, and the second The weakened texture region is filled with the region to obtain the weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the contour of the weakly textured region, according to the weak texture region The contour line acquires a boundary pixel point of the weak texture region; and calculates a depth value Z of the boundary pixel point according to the following formula:
Figure PCTCN2016101602-appb-000002
Figure PCTCN2016101602-appb-000002
其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
上述方案中,所述区域标记是指:把连续区域作同一个标记;In the above solution, the area mark refers to: making the continuous area the same mark;
所述对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,包括:And performing the area marking on the weak texture area to obtain the marked weak texture area, including:
采用四邻域标记算法或者八邻域标记算法,对所述弱纹理区域进行区域标记获得标记后的弱纹理区域。The weak texture region is region-marked to obtain the marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
上述方案中,所述将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,包括:In the above solution, the null-textured region of the binarized weakly textured region is filled with a cavity to obtain a weakly textured region after the cavity is filled, including:
采用区域空洞填充算法,将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。 The area void filling algorithm is used to fill the weakly textured area of the binarized area to obtain the weakly textured area after the cavity is filled.
上述方案中,所述获取所述边界像素点的深度值,包括:In the above solution, the obtaining the depth value of the boundary pixel includes:
应用立体匹配算法获取所述边界像素点的深度值。A stereo matching algorithm is applied to obtain a depth value of the boundary pixel.
上述方案中,所述根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点,包括:In the above solution, the filtering out the abrupt point in the boundary pixel according to the depth value of the boundary pixel to obtain a reliable point in the boundary pixel, including:
将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集;当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重复以上过程;在重复一定次数后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。Taking the depth value of the boundary pixel as the sample set P, randomly extracting the depth values of the n boundary pixel points from the sample set P as the subset S, and obtaining the initialization model M by plane fitting; the residual set SC=P The depth value of the boundary pixel point in the \S with the initialization model M whose error is less than the second threshold is divided into inner point sets; when the number of inner point concentration depth values reaches N, the least square method is used according to the inner point set. Calculating a new model M*; re-randomly extracting a new subset S*, repeating the above process; after repeating a certain number of times, selecting the obtained maximum inner point set, the depth value of the largest inner point set is the boundary pixel The depth value of the reliable point in the point, the remaining value in the sample set P is the depth value of the abrupt point in the boundary pixel point, and the n and N are preset values.
本发明实施例提供了一种图像中弱纹理区域的深度信息获取方法及终端,所述终端将图像分割成若干图像分割区域;根据所述梯度统计检测获得弱纹理区域;提取所述弱纹理区域的边界像素点,应用立体匹配算法获取所述边界像素点的深度值;根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。与现有技术中直接应用立体匹配算法获取弱纹理区域中各像素点的深度值相比,本实施例方法根据筛选出的可靠点的深度值进行平面拟合,估计出所述弱纹理区域中各像素点的深度值,可以减少弱纹理区域的深度值估计的错误概率,准确获取弱纹理区域的深度信息。An embodiment of the present invention provides a method and a terminal for acquiring depth information of a weak texture region in an image, where the terminal divides an image into a plurality of image segmentation regions; and obtains a weak texture region according to the gradient statistical detection; and extracts the weak texture region. a boundary pixel, applying a stereo matching algorithm to obtain a depth value of the boundary pixel; and filtering a sudden change point in the boundary pixel according to the depth value of the boundary pixel to obtain a reliable point in the boundary pixel And performing a plane fitting on the depth value of the reliable point to calculate a depth value of each pixel in the weak texture region. Compared with the depth value of each pixel in the weak texture region, the method of the present embodiment performs plane fitting according to the depth value of the selected reliable point, and estimates the weak texture region. The depth value of each pixel point can reduce the error probability of the depth value estimation of the weak texture region, and accurately obtain the depth information of the weak texture region.
附图说明DRAWINGS
图1为实现本发明各个实施例的移动终端的硬件结构示意图;1 is a schematic structural diagram of hardware of a mobile terminal that implements various embodiments of the present invention;
图2为如图1所示的移动终端的无线通信系统示意图; 2 is a schematic diagram of a wireless communication system of the mobile terminal shown in FIG. 1;
图3为本发明实施例1提供的一种终端的结构框图;3 is a structural block diagram of a terminal according to Embodiment 1 of the present invention;
图4为本发明实施例提供的一张用于处理的图像;4 is an image for processing according to an embodiment of the present invention;
图5为本发明实施例提供的对图4所示图像进行分割后由若干色块对应标识出若干图像分割区域的图示;FIG. 5 is a diagram of identifying, by using a plurality of color blocks, a plurality of image segmentation regions after the image shown in FIG. 4 is segmented according to an embodiment of the present invention;
图6为本发明实施例提供的标识出弱纹理区域的图像;FIG. 6 is an image showing a weak texture area according to an embodiment of the present invention;
图7为本发明实施例提供的对弱纹理区域进行二值化后的图像;FIG. 7 is an image obtained by binarizing a weak texture region according to an embodiment of the present invention;
图8为本发明实施例提供的对图7所示的二值化后的图像进行空洞填充后的图像;FIG. 8 is an image of a binarized image shown in FIG. 7 after being filled in a cavity according to an embodiment of the present invention; FIG.
图9为本发明实施例提供的对图8所示的空洞填充后的图像进行轮廓提取后的图像;FIG. 9 is an image obtained by performing contour extraction on a hole-filled image shown in FIG. 8 according to an embodiment of the present invention;
图10为本发明实施例提供的对可靠点的深度值进行平面拟合后的示意图;FIG. 10 is a schematic diagram of plane fitting of a depth value of a reliable point according to an embodiment of the present invention; FIG.
图11本发明实施例提供的应用现有方法获取的深度图像;FIG. 11 is a depth image obtained by applying an existing method according to an embodiment of the present invention;
图12本发明实施例提供的应用本发明实施例方法获取的深度图像;FIG. 12 is a depth image obtained by applying the method according to an embodiment of the present invention;
图13为本发明实施例2提供的一种图像中弱纹理区域的深度信息获取方法的流程示意图。FIG. 13 is a schematic flowchart diagram of a method for acquiring depth information of a weak texture region in an image according to Embodiment 2 of the present invention.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.
现在将参考附图1来描述实现本发明各个实施例的移动终端。在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身并没有特定的意义。因此,"模块"与"部件"可以混合地使用。A mobile terminal embodying various embodiments of the present invention will now be described with reference to FIG. In the following description, the use of suffixes such as "module", "component" or "unit" for indicating an element is merely an explanation for facilitating the present invention, and does not have a specific meaning per se. Therefore, "module" and "component" can be used in combination.
移动终端可以以各种形式来实施。例如,本发明中描述的终端可以包括诸如移动电话、智能电话、笔记本电脑、数字广播接收器、个人数字助 理(PDA)、平板电脑(PAD)、便携式多媒体播放器(PMP)、导航装置等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。下面,假设终端是移动终端。然而,本领域技术人员将理解的是,除了特别用于移动目的的元件之外,根据本发明的实施方式的构造也能够应用于固定类型的终端。The mobile terminal can be implemented in various forms. For example, the terminal described in the present invention may include, for example, a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, and a personal digital assistant. Mobile terminals of PDAs, tablet computers (PADs), portable multimedia players (PMPs), navigation devices, and the like, and fixed terminals such as digital TVs, desktop computers, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, those skilled in the art will appreciate that configurations in accordance with embodiments of the present invention can be applied to fixed type terminals in addition to components that are specifically for mobile purposes.
图1为实现本发明各个实施例的移动终端的硬件结构示意。FIG. 1 is a schematic diagram showing the hardware structure of a mobile terminal embodying various embodiments of the present invention.
移动终端100可以包括无线通讯单元110、音频/视频(A/V)输入单元120、用户输入单元130、感测单元140、输出单元150、存储器160、接口单元170、控制器180和电源单元190等等。图1示出了具有各种组件的移动终端,但是应理解的是,并不要求实施所有示出的组件,可以替代地实施更多或更少的组件,将在下面详细描述移动终端的元件。The mobile terminal 100 may include a wireless communication unit 110, an audio/video (A/V) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190. and many more. Figure 1 shows a mobile terminal having various components, but it should be understood that not all illustrated components are required to be implemented, and more or fewer components may be implemented instead, and the components of the mobile terminal will be described in detail below. .
无线通讯单元110通常包括一个或多个组件,其允许移动终端100与无线通讯系统或网络之间的无线电通讯。例如,无线通讯单元可以包括广播接收模块111、移动通讯模块112、无线互联网模块113、短程通讯模块114和位置信息模块115中的至少一个。 Wireless communication unit 110 typically includes one or more components that permit radio communication between mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
广播接收模块111经由广播信道从外部广播管理服务器接收广播信号和/或广播相关信息。广播信道可以包括卫星信道和/或地面信道。广播管理服务器可以是生成并发送广播信号和/或广播相关信息的服务器或者接收之前生成的广播信号和/或广播相关信息并且将其发送给终端的服务器。广播信号可以包括TV广播信号、无线电广播信号、数据广播信号等等。而且,广播信号可以进一步包括与TV或无线电广播信号组合的广播信号。广播相关信息也可以经由移动通讯网络提供,并且在该情况下,广播相关信息可以由移动通讯模块112来接收。广播信号可以以各种形式存在,例如,其可以以数字多媒体广播(DMB)的电子节目指南(EPG)、数字视频广播手持(DVB-H)的电子服务指南(ESG)等等的形式而存在。广播接收模块 111可以通过使用各种类型的广播系统接收信号广播。特别地,广播接收模块111可以通过使用诸如多媒体广播-地面(DMB-T)、数字多媒体广播-卫星(DMB-S)、数字视频广播-手持(DVB-H),前向链路媒体(Media FLO@)的数据广播系统、地面数字广播综合服务(ISDB-T)等等的数字广播系统接收数字广播。广播接收模块111可以被构造为适合提供广播信号的各种广播系统以及上述数字广播系统。经由广播接收模块111接收的广播信号和/或广播相关信息可以存储在存储器160(或者其它类型的存储介质)中。The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel can include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to the terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Moreover, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of Digital Multimedia Broadcasting (DMB) Electronic Program Guide (EPG), Digital Video Broadcasting Handheld (DVB-H) Electronic Service Guide (ESG), and the like. . Broadcast receiving module The signal broadcast can be received by using various types of broadcast systems. In particular, the broadcast receiving module 111 can use forward link media (Media) such as Multimedia Broadcast-Ground (DMB-T), Digital Multimedia Broadcast-Satellite (DMB-S), Digital Video Broadcast-Handheld (DVB-H) Digital broadcasting systems such as FLO@) data broadcasting systems, terrestrial digital broadcasting integrated services (ISDB-T), etc. receive digital broadcasting. The broadcast receiving module 111 can be constructed as various broadcast systems suitable for providing broadcast signals as well as the above-described digital broadcast system. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
移动通讯模块112将无线电信号发送到基站(例如,接入点、节点B等等)、外部终端以及服务器中的至少一个和/或从其接收无线电信号。这样的无线电信号可以包括语音通话信号、视频通话信号、或者根据文本和/或多媒体消息发送和/或接收的各种类型的数据。The mobile communication module 112 transmits the radio signals to and/or receives radio signals from at least one of a base station (e.g., an access point, a Node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received in accordance with text and/or multimedia messages.
无线互联网模块113支持移动终端的无线互联网接入。该模块可以内部或外部地耦接到终端。该模块所涉及的无线互联网接入技术可以包括无线局域网(WLAN)(Wi-Fi)、无线宽带(Wibro)、全球微波互联接入(Wimax)、高速下行链路分组接入(HSDPA)等等。The wireless internet module 113 supports wireless internet access of the mobile terminal. The module can be internally or externally coupled to the terminal. The wireless Internet access technologies involved in the module may include Wireless Local Area Network (WLAN) (Wi-Fi), Wireless Broadband (Wibro), Worldwide Interoperability for Microwave Access (Wimax), High Speed Downlink Packet Access (HSDPA), and the like. .
短程通讯模块114是用于支持短程通讯的模块。短程通讯技术的一些示例包括蓝牙TM、射频识别(RFID)、红外数据协会(IrDA)、超宽带(UWB)、紫蜂TM等等。The short range communication module 114 is a module for supporting short range communication. Some examples of short-range communication technologies include BluetoothTM, Radio Frequency Identification (RFID), Infrared Data Association (IrDA), Ultra Wideband (UWB), ZigbeeTM, and the like.
位置信息模块115是用于检查或获取移动终端的位置信息的模块。位置信息模块的典型示例是全球定位系统(GPS)。根据当前的技术,GPS模块115计算来自三个或更多卫星的距离信息和准确的时间信息并且对于计算的信息应用三角测量法,从而根据经度、纬度和高度准确地计算三维当前位置信息。当前,用于计算位置和时间信息的方法使用三颗卫星并且通过使用另外的一颗卫星校正计算出的位置和时间信息的误差。此外,GPS模块115能够通过实时地连续计算当前位置信息来计算速度信息。 The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of a location information module is the Global Positioning System (GPS). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information to accurately calculate three-dimensional current position information based on longitude, latitude, and altitude. Currently, the method for calculating position and time information uses three satellites and corrects the calculated position and time information errors by using another satellite. Further, the GPS module 115 is capable of calculating speed information by continuously calculating current position information in real time.
A/V输入单元120用于接收音频或视频信号。A/V输入单元120可以包括相机121和麦克风122,相机121对在视频捕获模式或图像捕获模式中由图像捕获装置获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元151上。经相机121处理后的图像帧可以存储在存储器160(或其它存储介质)中或者经由无线通讯单元110进行发送,可以根据移动终端的构造提供两个或更多相机121。麦克风122可以在电话通话模式、记录模式、语音识别模式等等运行模式中经由麦克风接收声音(音频数据),并且能够将这样的声音处理为音频数据。处理后的音频(语音)数据可以在电话通话模式的情况下转换为可经由移动通讯模块112发送到移动通讯基站的格式输出。麦克风122可以实施各种类型的噪声消除(或抑制)算法以消除(或抑制)在接收和发送音频信号的过程中产生的噪声或者干扰。The A/V input unit 120 is for receiving an audio or video signal. The A/V input unit 120 may include a camera 121 and a microphone 122 that processes image data of still pictures or video obtained by the image capturing device in a video capturing mode or an image capturing mode. The processed image frame can be displayed on the display unit 151. The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 121 may be provided according to the configuration of the mobile terminal. The microphone 122 can receive sound (audio data) via a microphone in an operation mode of a telephone call mode, a recording mode, a voice recognition mode, and the like, and can process such sound as audio data. The processed audio (voice) data can be converted to a format output that can be transmitted to the mobile communication base station via the mobile communication module 112 in the case of a telephone call mode. The microphone 122 can implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated during the process of receiving and transmitting audio signals.
用户输入单元130可以根据用户输入的命令生成键输入数据以控制移动终端的各种操作。用户输入单元130允许用户输入各种类型的信息,并且可以包括键盘、锅仔片、触摸板(例如,检测由于被接触而导致的电阻、压力、电容等等的变化的触敏组件)、滚轮、摇杆等等。特别地,当触摸板以层的形式叠加在显示单元151上时,可以形成触摸屏。The user input unit 130 may generate key input data according to a command input by the user to control various operations of the mobile terminal. The user input unit 130 allows the user to input various types of information, and may include a keyboard, a pot, a touch pad (eg, a touch sensitive component that detects changes in resistance, pressure, capacitance, etc. due to contact), a scroll wheel , rocker, etc. In particular, when the touch panel is superimposed on the display unit 151 in the form of a layer, a touch screen can be formed.
感测单元140检测移动终端100的当前状态,(例如,移动终端100的打开或关闭状态)、移动终端100的位置、用户对于移动终端100的接触(即,触摸输入)的有无、移动终端100的取向、移动终端100的加速或减速移动和方向等等,并且生成用于控制移动终端100的操作的命令或信号。例如,当移动终端100实施为滑动型移动电话时,感测单元140可以感测该滑动型电话是打开还是关闭。另外,感测单元140能够检测电源单元190是否提供电力或者接口单元170是否与外部装置耦接。感测单元140可以包括接近传感器141将在下面结合触摸屏来对此进行描述。 The sensing unit 140 detects the current state of the mobile terminal 100 (eg, the open or closed state of the mobile terminal 100), the location of the mobile terminal 100, the presence or absence of contact (ie, touch input) by the user with the mobile terminal 100, and the mobile terminal. The orientation of 100, the acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling the operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide type mobile phone, the sensing unit 140 can sense whether the slide type phone is turned on or off. In addition, the sensing unit 140 can detect whether the power supply unit 190 provides power or whether the interface unit 170 is coupled to an external device. Sensing unit 140 may include proximity sensor 141 which will be described below in connection with a touch screen.
接口单元170用作至少一个外部装置与移动终端100连接可以通过的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。识别模块可以是存储用于验证用户使用移动终端100的各种信息并且可以包括用户识别模块(UIM)、客户识别模块(SIM)、通用客户识别模块(USIM)等等。另外,具有识别模块的装置(下面称为"识别装置")可以采取智能卡的形式,因此,识别装置可以经由端口或其它连接装置与移动终端100连接。接口单元170可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到移动终端100内的一个或多个元件或者可以用于在移动终端和外部装置之间传输数据。The interface unit 170 serves as an interface through which at least one external device can connect with the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, and an audio input/output. (I/O) port, video I/O port, headphone port, and more. The identification module may be stored to verify various information used by the user using the mobile terminal 100 and may include a User Identification Module (UIM), a Customer Identification Module (SIM), a Universal Customer Identity Module (USIM), and the like. In addition, the device having the identification module (hereinafter referred to as "identification device") may take the form of a smart card, and thus the identification device may be connected to the mobile terminal 100 via a port or other connection device. The interface unit 170 can be configured to receive input from an external device (eg, data information, power, etc.) and transmit the received input to one or more components within the mobile terminal 100 or can be used at the mobile terminal and external device Transfer data between.
另外,当移动终端100与外部底座连接时,接口单元170可以用作允许通过其将电力从底座提供到移动终端100的路径或者可以用作允许从底座输入的各种命令信号通过其传输到移动终端的路径。从底座输入的各种命令信号或电力可以用作用于识别移动终端是否准确地安装在底座上的信号。输出单元150被构造为以视觉、音频和/或触觉方式提供输出信号(例如,音频信号、视频信号、警报信号、振动信号等等)。输出单元150可以包括显示单元151、音频输出模块152、警报单元153等等。In addition, when the mobile terminal 100 is connected to the external base, the interface unit 170 may function as a path through which power is supplied from the base to the mobile terminal 100 or may be used as a transmission of various command signals allowing input from the base to the mobile terminal 100 The path to the terminal. Various command signals or power input from the base can be used as signals for identifying whether the mobile terminal is accurately mounted on the base. Output unit 150 is configured to provide an output signal (eg, an audio signal, a video signal, an alarm signal, a vibration signal, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
显示单元151可以显示在移动终端100中处理的信息。例如,当移动终端100处于电话通话模式时,显示单元151可以显示与通话或其它通讯(例如,文本消息收发、多媒体文件下载等等)相关的用户界面(UI)或图形用户界面(GUI)。当移动终端100处于视频通话模式或者图像捕获模式时,显示单元151可以显示捕获的图像和/或接收的图像、示出视频或图像以及相关功能的UI或GUI等等。The display unit 151 can display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 can display a user interface (UI) or a graphical user interface (GUI) related to a call or other communication (eg, text messaging, multimedia file download, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or image and related functions, and the like.
同时,当显示单元151和触摸板以层的形式彼此叠加以形成触摸屏时, 显示单元151可以用作输入装置和输出装置。显示单元151可以包括液晶显示器(LCD)、薄膜晶体管LCD(TFT-LCD)、有机发光二极管(OLED)显示器、柔性显示器、三维(3D)显示器等等中的至少一种。这些显示器中的一些可以被构造为透明状以允许用户从外部观看,这可以称为透明显示器,典型的透明显示器可以例如为TOLED(透明有机发光二极管)显示器等等。根据特定想要的实施方式,移动终端100可以包括两个或更多显示单元(或其它显示装置),例如,移动终端可以包括外部显示单元(未示出)和内部显示单元(未示出)。触摸屏可用于检测触摸输入压力以及触摸输入位置和触摸输入面积。Meanwhile, when the display unit 151 and the touch panel are superposed on each other in the form of a layer to form a touch screen, The display unit 151 can be used as an input device and an output device. The display unit 151 may include at least one of a liquid crystal display (LCD), a thin film transistor LCD (TFT-LCD), an organic light emitting diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as a transparent display, and a typical transparent display may be, for example, a TOLED (Transparent Organic Light Emitting Diode) display or the like. According to a particular desired embodiment, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown) . The touch screen can be used to detect touch input pressure as well as touch input position and touch input area.
音频输出模块152可以在移动终端处于呼叫信号接收模式、通话模式、记录模式、语音识别模式、广播接收模式等等模式下时,将无线通讯单元110接收的或者在存储器160中存储的音频数据转换音频信号并且输出为声音。而且,音频输出模块152可以提供与移动终端100执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出模块152可以包括扬声器、蜂鸣器等等。The audio output module 152 can convert the audio data received by the wireless communication unit 110 or stored in the memory 160 when the mobile terminal is in a call signal receiving mode, a call mode, a recording mode, a voice recognition mode, a broadcast receiving mode, and the like. The audio signal is output as sound. Moreover, the audio output module 152 can provide audio output (eg, call signal reception sound, message reception sound, etc.) associated with a particular function performed by the mobile terminal 100. The audio output module 152 can include a speaker, a buzzer, and the like.
警报单元153可以提供输出以将事件的发生通知给移动终端100。典型的事件可以包括呼叫接收、消息接收、键信号输入、触摸输入等等。除了音频或视频输出之外,警报单元153可以以不同的方式提供输出以通知事件的发生。例如,警报单元153可以以振动的形式提供输出,当接收到呼叫、消息或一些其它进入通讯(incoming communication)时,警报单元153可以提供触觉输出(即,振动)以将其通知给用户。通过提供这样的触觉输出,即使在用户的移动电话处于用户的口袋中时,用户也能够识别出各种事件的发生。警报单元153也可以经由显示单元151或音频输出模块152提供通知事件的发生的输出。The alarm unit 153 can provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alert unit 153 can provide an output in a different manner to notify of the occurrence of an event. For example, the alarm unit 153 can provide an output in the form of vibrations, and when a call, message, or some other incoming communication is received, the alarm unit 153 can provide a tactile output (ie, vibration) to notify the user of it. By providing such a tactile output, the user is able to recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 can also provide an output of the notification event occurrence via the display unit 151 or the audio output module 152.
存储器160可以存储由控制器180执行的处理和控制操作的软件程序 等等,或者可以暂时地存储己经输出或将要输出的数据(例如,电话簿、消息、静态图像、视频等等)。而且,存储器160可以存储关于当触摸施加到触摸屏时输出的各种方式的振动和音频信号的数据。The memory 160 can store a software program that is processed and controlled by the controller 180. And so on, or data that has been output or is about to be output (for example, a phone book, a message, a still image, a video, etc.) can be temporarily stored. Moreover, the memory 160 can store data regarding vibrations and audio signals of various manners that are output when a touch is applied to the touch screen.
存储器160可以包括至少一种类型的存储介质,所述存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等等。而且,移动终端100可以与通过网络连接执行存储器160的存储功能的网络存储装置协作。The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (eg, SD or DX memory, etc.), a random access memory (RAM), a static random access memory ( SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disk, optical disk, and the like. Moreover, the mobile terminal 100 can cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
控制器180通常控制移动终端的总体操作。例如,控制器180执行与语音通话、数据通讯、视频通话等等相关的控制和处理。另外,控制器180可以包括用于再现(或回放)多媒体数据的多媒体模块181,多媒体模块181可以构造在控制器180内,或者可以构造为与控制器180分离。控制器180可以执行模式识别处理,以将在触摸屏上执行的手写输入或者图片绘制输入识别为字符或图像。The controller 180 typically controls the overall operation of the mobile terminal. For example, the controller 180 performs the control and processing associated with voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 181 for reproducing (or playing back) multimedia data, which may be constructed within the controller 180 or may be configured to be separate from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
电源单元190在控制器180的控制下接收外部电力或内部电力并且提供操作各元件和组件所需的适当的电力。The power supply unit 190 receives external power or internal power under the control of the controller 180 and provides appropriate power required to operate the various components and components.
这里描述的各种实施方式可以以使用例如计算机软件、硬件或其任何组合的计算机可读介质来实施。对于硬件实施,这里描述的实施方式可以通过使用特定用途集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理装置(DSPD)、可编程逻辑装置(PLD)、现场可编程门阵列(FPGA)、处理器、控制器、微控制器、微处理器、被设计为执行这里描述的功能的电子单元中的至少一种来实施,在一些情况下,这样的实施方式可以在控制器180中实施。对于软件实施,诸如过程或功能的实施方式可以与允许执行至少一种功能或操作的单独的软件模块来实施。软件代码可以由以任 何适当的编程语言编写的软件应用程序(或程序)来实施,软件代码可以存储在存储器160中并且由控制器180执行。The various embodiments described herein can be implemented in a computer readable medium using, for example, computer software, hardware, or any combination thereof. For hardware implementations, the embodiments described herein may be through the use of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays ( An FPGA, a processor, a controller, a microcontroller, a microprocessor, at least one of the electronic units designed to perform the functions described herein, in some cases, such an embodiment may be at the controller 180 Implemented in the middle. For software implementations, implementations such as procedures or functions may be implemented with separate software modules that permit the execution of at least one function or operation. Software code can be used by The software application (or program) written in a suitable programming language is implemented, and the software code can be stored in the memory 160 and executed by the controller 180.
至此,己经按照其功能描述了移动终端。下面,为了简要起见,将描述诸如折叠型、直板型、摆动型、滑动型移动终端等等的各种类型的移动终端中的滑动型移动终端作为示例。因此,本发明能够应用于任何类型的移动终端,并且不限于滑动型移动终端。So far, the mobile terminal has been described in terms of its function. Hereinafter, for the sake of brevity, a slide type mobile terminal among various types of mobile terminals such as a folding type, a bar type, a swing type, a slide type mobile terminal, and the like will be described as an example. Therefore, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
如图1中所示的移动终端100可以被构造为利用经由帧或分组发送数据的诸如有线和无线通讯系统以及基于卫星的通讯系统来操作。The mobile terminal 100 as shown in FIG. 1 may be configured to operate using a communication system such as a wired and wireless communication system and a satellite-based communication system that transmits data via frames or packets.
现在将参考图2描述其中根据本发明的移动终端能够操作的通讯系统。A communication system in which a mobile terminal according to the present invention can be operated will now be described with reference to FIG.
这样的通讯系统可以使用不同的空中接口和/或物理层。例如,由通讯系统使用的空中接口包括例如频分多址(FDMA)、时分多址(TDMA)、码分多址(CDMA)和通用移动通讯系统(UMTS)(特别地,长期演进(LTE))、全球移动通讯系统(GSM)等等。作为非限制性示例,下面的描述涉及CDMA通讯系统,但是这样的教导同样适用于其它类型的系统。Such communication systems can use different air interfaces and/or physical layers. For example, air interfaces used by communication systems include, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)). ), Global System for Mobile Communications (GSM), etc. As a non-limiting example, the following description relates to CDMA communication systems, but such teachings are equally applicable to other types of systems.
参考图2,CDMA无线通讯系统可以包括多个移动终端100、多个基站(BS)270、基站控制器(BSC)275和移动交换中心(MSC)280。MSC280被构造为与公共电话交换网络(PSTN)290形成接口。MSC280还被构造为与可以经由回程线路耦接到基站270的BSC275形成接口。回程线路可以根据若干己知的接口中的任一种来构造,所述接口包括例如E1/T1、ATM,IP、PPP、帧中继、HDSL、ADSL或xDSL。将理解的是,如图2中所示的系统可以包括多个BSC275。Referring to FIG. 2, a CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of base stations (BS) 270, a base station controller (BSC) 275, and a mobile switching center (MSC) 280. The MSC 280 is configured to interface with a public switched telephone network (PSTN) 290. The MSC 280 is also configured to interface with a BSC 275 that can be coupled to the base station 270 via a backhaul line. The backhaul line can be constructed in accordance with any of a number of well known interfaces including, for example, E1/T1, ATM, IP, PPP, Frame Relay, HDSL, ADSL, or xDSL. It will be appreciated that the system as shown in FIG. 2 can include multiple BSCs 275.
每个BS270可以服务一个或多个分区(或区域),由多向天线或指向特定方向的天线覆盖的每个分区放射状地远离BS270。或者,每个分区可以由用于分集接收的两个或更多天线覆盖。每个BS270可以被构造为支持多个频率分配,并且每个频率分配具有特定频谱(例如,1.25MHz,5MHz等 等)。Each BS 270 can serve one or more partitions (or regions), each of which is covered by a multi-directional antenna or an antenna directed to a particular direction radially away from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS 270 can be configured to support multiple frequency allocations, and each frequency allocation has a particular frequency spectrum (eg, 1.25 MHz, 5 MHz, etc.) Wait).
分区与频率分配的交叉可以被称为CDMA信道。BS270也可以被称为基站收发器子系统(BTS)或者其它等效术语。在这样的情况下,术语"基站"可以用于笼统地表示单个BSC275和至少一个BS270。基站也可以被称为"蜂窝站"。或者,特定BS270的各分区可以被称为多个蜂窝站。The intersection of partitioning and frequency allocation can be referred to as a CDMA channel. BS 270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" can be used to generally refer to a single BSC 275 and at least one BS 270. A base station can also be referred to as a "cell station." Alternatively, each partition of a particular BS 270 may be referred to as a plurality of cellular stations.
如图2中所示,广播发射器(BT)295将广播信号发送给在系统内操作的移动终端100。如图1中所示的广播接收模块111被设置在移动终端100处以接收由BT295发送的广播信号。在图2中,示出了几个全球定位系统(GPS)卫星300。卫星300帮助定位多个移动终端100中的至少一个。As shown in FIG. 2, a broadcast transmitter (BT) 295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in FIG. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In Figure 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 helps locate at least one of the plurality of mobile terminals 100.
在图2中,描绘了多个卫星300,但是理解的是,可以利用任何数目的卫星获得有用的定位信息。如图1中所示的GPS模块115通常被构造为与卫星300配合以获得想要的定位信息。替代GPS跟踪技术或者在GPS跟踪技术之外,可以使用可以跟踪移动终端的位置的其它技术。另外,至少一个GPS卫星300可以选择性地或者额外地处理卫星DMB传输。In Figure 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information can be obtained using any number of satellites. The GPS module 115 as shown in Figure 1 is typically configured to cooperate with the satellite 300 to obtain desired positioning information. Instead of GPS tracking technology or in addition to GPS tracking technology, other techniques that can track the location of the mobile terminal can be used. Additionally, at least one GPS satellite 300 can selectively or additionally process satellite DMB transmissions.
作为无线通讯系统的一个典型操作,BS270接收来自各种移动终端100的反向链路信号。移动终端100通常参与通话、消息收发和其它类型的通讯。特定基站270接收的每个反向链路信号被在特定BS270内进行处理。获得的数据被转发给相关的BSC275。BSC提供通话资源分配和包括BS270之间的软切换过程的协调的移动管理功能。BSC275还将接收到的数据路由到MSC280,其提供用于与PSTN290形成接口的额外的路由服务。类似地,PSTN290与MSC280形成接口,MSC与BSC275形成接口,并且BSC275相应地控制BS270以将正向链路信号发送到移动终端100。As a typical operation of a wireless communication system, BS 270 receives reverse link signals from various mobile terminals 100. Mobile terminal 100 typically participates in calls, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within a particular BS 270. The obtained data is forwarded to the relevant BSC 275. The BSC provides call resource allocation and coordinated mobility management functions including a soft handoff procedure between the BSs 270. The BSC 275 also routes the received data to the MSC 280, which provides additional routing services for interfacing with the PSTN 290. Similarly, PSTN 290 interfaces with MSC 280, which forms an interface with BSC 275, and BSC 275 controls BS 270 accordingly to transmit forward link signals to mobile terminal 100.
基于上述移动终端硬件结构以及通讯系统,提出本发明方法各个实施例。Based on the above-described mobile terminal hardware structure and communication system, various embodiments of the method of the present invention are proposed.
实施例1 Example 1
本发明实施例提供了一种终端,如图3所示,所述终端包括图像分割模块301,弱纹理区域获取模块302,边缘深度获取模块303,区域深度获取模块304;其中,The embodiment of the present invention provides a terminal. As shown in FIG. 3, the terminal includes an image segmentation module 301, a weak texture region acquisition module 302, an edge depth acquisition module 303, and a region depth acquisition module 304.
图像分割模块301,配置为获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域。The image segmentation module 301 is configured to acquire color and brightness information of the image, and divide the image into a plurality of regions according to the color and brightness information.
对于图4所示的图像,图像分割模块301可以根据所述图像的颜色与亮度信息,将所述图像进行分割。For the image shown in FIG. 4, the image segmentation module 301 can segment the image according to the color and brightness information of the image.
图像分割模块301具体可以应用基于区域的分割方法如区域生长方法来对图像进行分割。区域生长的基本思想是将具有相似性质的像素集合起来构成区域。具体先对每个需要分割的区域找一个种子像素点作为生长的起点,然后将种子像素点周围中与种子像素点有相同或相似性质的像素(本实施例中是颜色和亮度信息相似的像素)合并到种子像素点所在的区域中。将这些新像素当作新的种子像素点继续进行上面的过程,直到再没有满足条件的像素可被包括进来。这样一个区域就长成了。The image segmentation module 301 may specifically apply a region-based segmentation method such as a region growing method to segment an image. The basic idea of region growing is to group pixels with similar properties to form regions. Specifically, a seed pixel is searched for each of the regions to be segmented as a starting point for growth, and then pixels in the periphery of the seed pixel having the same or similar properties as the seed pixel (in this embodiment, pixels having similar color and luminance information) ) merged into the area where the seed pixel is located. These new pixels are treated as new seed pixels to continue the above process until no more pixels satisfying the condition can be included. Such an area will grow.
即所述图像分割模块,还配置为选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。That is, the image segmentation module is further configured to select a plurality of seed pixels, divide a new pixel point satisfying the preset condition around the seed pixel point into an area where the seed pixel point is located, and treat the new pixel point as a new seed pixel, continuing to divide a new pixel point satisfying the preset condition around the new seed pixel to an area where the seed pixel point is located, until a preset condition does not exist around the new seed pixel point a pixel, obtaining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that a difference between the color and the luminance information is within a first threshold compared to the seed pixel.
所述图像分割模块还可以利用均值漂移(meanshift)算法,根据所述图像的颜色和亮度信息将所述图像进行分割,获取到若干区域。The image segmentation module may further divide the image according to color and brightness information of the image by using a mean shift algorithm to acquire a plurality of regions.
Mean Shift算法是一种有效的统计迭代算法,基于Mean Shift算法的图像分割也是一种基于区域的分割方法,这种分割方法跟人眼的对图像的分 析特性极其相近,并且具有很强的适应性和鲁棒性。它对图像的平滑区域和图像纹理区域并不敏感,所以能够得到很好的分割结果。此算法己经在计算机视觉领域得到了较为广泛的应用并取得了较大的成功。本实施例可以应用Mean Shift算法,将所述图像按照颜色和亮度信息分割为若干图像分割区域。Mean Shift algorithm is an effective statistical iterative algorithm. Image segmentation based on Mean Shift algorithm is also a region-based segmentation method. The analysis features are very similar and have strong adaptability and robustness. It is not sensitive to the smooth area of the image and the image texture area, so it can get good segmentation results. This algorithm has been widely used in the field of computer vision and has achieved great success. This embodiment may apply the Mean Shift algorithm to segment the image into a plurality of image segmentation regions according to color and luminance information.
用Mean Shift算法进行图像分割的大概步骤如下:The approximate steps for image segmentation using the Mean Shift algorithm are as follows:
1、对每一个象素点i,初始化j=1,并且使yi,1=xi1. For each pixel point i, initialize j=1 and make y i,1 =x i ;
2、运用均值漂移算法计算yi,j+1,即
Figure PCTCN2016101602-appb-000003
其中,w(xi)为权重系数,g(x)=-k'(x)称为k的影子函数,k为核函数剖面函数,均值漂移的过程不断进行,对于每个特征向量xi,通过多次迭代收敛到不同模式点,记收敛后的值为yic,赋值
Figure PCTCN2016101602-appb-000004
2. Calculate y i,j+1 using the mean shift algorithm, ie
Figure PCTCN2016101602-appb-000003
Where w(x i ) is the weight coefficient, g(x)=-k'(x) is called the shadow function of k, k is the kernel function profile function, and the process of mean shift is continuously performed for each feature vector x i , converge to different mode points through multiple iterations, the value after convergence is y ic , assignment
Figure PCTCN2016101602-appb-000004
3、重复1和2的步骤,形成聚类中心集合Cd={cd,k,k=1,2,.....n};经过该预分类的过程,初始特征向量依据聚类中心的不同划分为n个类。3. Repeat steps 1 and 2 to form a cluster center set C d ={c d,k ,k=1,2,.....n}; after the pre-classification process, the initial feature vector is clustered. The center is divided into n categories.
4、再对Cd从空域进行检测,若任意ci,cj∈Cd,i≠j满足在特征空间中位于相同包围球内,则认为特征相近,将ci和cj归为一类,即经过以上的处理,最终聚为同一类的像素点被分割成一个区域,这样图像就会被分割成若干区域。4. Then, C d is detected from the airspace. If any c i , c j ∈ C d , i ≠ j satisfies in the same bounding sphere in the feature space, the features are considered to be similar, and c i and c j are classified into one. The class, that is, after the above processing, the pixels that are finally clustered into the same class are divided into a region, so that the image is divided into several regions.
当然,在基于图像的颜色和亮度信息的情况下,图像分割模块301还可以采用基于阈值的分割方法、基于边缘的分割方法、聚类分析方法等图割方法将该图像进行分割,本实施例采用的具体图像分割方法,在此并不做限制。Of course, in the case of image-based color and luminance information, the image segmentation module 301 may further divide the image by using a threshold-based segmentation method, an edge-based segmentation method, a clustering segmentation method, or the like. The specific image segmentation method adopted is not limited herein.
图像分割模块301是基于图像的颜色和亮度信息来进行图像分割的, 分割成的区域内部的像素点在颜色和亮度上特征都比较相近。示例的,将图4所示图像进行分割,不同图像分割区域用不同色块表示,效果如图5所示。The image segmentation module 301 performs image segmentation based on color and brightness information of the image. The pixels inside the divided area are similar in color and brightness. For example, the image shown in FIG. 4 is segmented, and different image segmentation regions are represented by different color blocks, and the effect is as shown in FIG. 5.
弱纹理区域获取模块302,配置为计算获得所述图像对应的梯度信息,根据所述梯度信息从所述图像分割模块分割的若干区域中选取出弱纹理区域,所述弱纹理区域为梯度统计平均值在预设范围内的区域。The weak texture region obtaining module 302 is configured to calculate the gradient information corresponding to the image, and select a weak texture region from the regions segmented by the image segmentation module according to the gradient information, where the weak texture region is a gradient statistical average An area whose value is within the preset range.
可以将图像看成二维离散函数I(i,j),(i,j)为图像中像素点的坐标,I(i,j)为像素点(i,j)的像素值(如:RGB值),所述图像的梯度信息其实就是这个二维离散函数的求导:The image can be regarded as a two-dimensional discrete function I(i,j), (i,j) is the coordinates of the pixel points in the image, and I(i,j) is the pixel value of the pixel point (i,j) (eg RGB) Value), the gradient information of the image is actually the derivation of this two-dimensional discrete function:
图像的梯度信息可以为:G(x,y)=dx(i,j)+dy(i,j);The gradient information of the image may be: G(x, y) = dx(i, j) + dy(i, j);
其中,dx(i,j)=I(i+1,j)-I(i,j);Where dx(i,j)=I(i+1,j)-I(i,j);
dy(i,j)=I(i,j+1)-I(i,j);Dy(i,j)=I(i,j+1)-I(i,j);
也可以用中值差分:You can also use the median difference:
dx(i,j)=[I(i+1,j)-I(i-1,j)]/2;Dx(i,j)=[I(i+1,j)-I(i-1,j)]/2;
dy(i,j)=[I(i,j+1)-I(i,j-1)]/2;Dy(i,j)=[I(i,j+1)-I(i,j-1)]/2;
以上只是举例说明最简单的梯度定义,其实还有更多更复杂的梯度公式。比如:Sobel、Roberts、kirsch、laplace、piewitt、robinson算子等。The above is just an example of the simplest gradient definition, but there are more and more complex gradient formulas. For example: Sobel, Roberts, kirsch, laplace, piewitt, robinson operators, etc.
图像的梯度大小可以反映出图像的像素的亮度以及颜色的频率变化大小,对于弱纹理区域,其内部像素点的亮度颜色比较相近,变化较小,相应的梯度值也比较小,按照该原理,对于所述图像分割模块301分割成的若干区域,其中梯度统计平均值较小的区域即为弱纹理区域。The gradient size of the image can reflect the brightness of the pixels of the image and the frequency change of the color. For the weak texture region, the brightness of the internal pixel points is similar, the change is small, and the corresponding gradient value is relatively small. According to the principle, For the regions into which the image segmentation module 301 is divided, the region in which the gradient statistical average is small is the weak texture region.
本实施例中,弱纹理区域获取模块302根据现有的某种梯度算法可以计算获得所述图像对应的梯度信息,即获得所述图像中各个像素点对应的梯度,然后所述弱纹理区域获取模块302可以计算出所述图像分割模块301分割的若干区域内的像素点对应的梯度统计平均值,选取梯度统计平均值 在预设范围内的区域为弱纹理区域。预设范围为一个梯度统计平均值取值较小的范围如0-10,具体可根据实际情况来限定。In this embodiment, the weak texture region obtaining module 302 may calculate the gradient information corresponding to the image according to an existing gradient algorithm, that is, obtain a gradient corresponding to each pixel point in the image, and then obtain the weak texture region. The module 302 may calculate a gradient statistical average value corresponding to the pixel points in the plurality of regions divided by the image segmentation module 301, and select a gradient statistical average value. The area within the preset range is a weakly textured area. The preset range is a range in which the gradient statistical average value is small, such as 0-10, which may be specifically determined according to actual conditions.
示例的,对于图4所示的图像,通过弱纹理区域获取模块302的上述处理可以获得如图6标示出的三个弱纹理区域。By way of example, for the image shown in FIG. 4, the three weak texture regions as illustrated in FIG. 6 can be obtained by the above-described processing of the weak texture region acquisition module 302.
所述边缘深度获取模块303,配置为提取所述弱纹理区域获取模块302选取的弱纹理区域的边界像素点,获取所述边界像素点的深度值。The edge depth obtaining module 303 is configured to extract boundary pixel points of the weak texture region selected by the weak texture region obtaining module 302, and obtain a depth value of the boundary pixel point.
所述边缘深度获取模块303,还配置为对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的边界像素点;按照以下公式计算获取所述边界像素点的深度值Z:The edge depth obtaining module 303 is further configured to perform area marking on the weak texture area to obtain a marked weak texture area, and then binarize the marked weak texture area and other areas of the image to obtain a binary value. a weak texture region after the binarized weak texture region is filled with the region to obtain a weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the weak texture region a contour line, the boundary pixel of the weak texture region is obtained according to the contour of the weak texture region; and the depth value Z of the boundary pixel is obtained according to the following formula:
Figure PCTCN2016101602-appb-000005
Figure PCTCN2016101602-appb-000005
其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
区域标记就是把连续区域作同一个标记,常见的区域标记方法有四邻域标记算法和八邻域标记算法。The area mark is to mark the continuous area with the same mark. The common area mark method has four neighborhood mark algorithm and eight neighborhood mark algorithm.
二值化,就是将图像上的像素点的灰度值设置为0或255,也就是将整个图像呈现出明显的只有黑和白的视觉效果。Binarization is to set the gray value of the pixel on the image to 0 or 255, that is, to present the entire image with a distinct black and white visual effect.
对于图6所标示出的三个弱纹理区域中位于图像右上方的弱纹理区域,进行区域标记,即将图像右上方的弱纹理区域标记为1号区域,其他区域标记为2号区域;然后将标记后的弱纹理区域即1号区域与所述图像的其他区域即2号区域进行二值化,就如图7所示,位于图像右上方的弱纹理 区域显示为白色,图像中的其他区域显示为黑色。通常由于噪声的影响,弱纹理区域中的部分像素点会被误认为不属于弱纹理区域,导致检测出的弱纹理区域内部出现空洞,如图7中的白色区域内的黑点。For the weak texture area located at the upper right of the image among the three weak texture areas indicated in FIG. 6, the area mark is performed, that is, the weak texture area on the upper right of the image is marked as the area No. 1, and the other areas are marked as the area No. 2; The marked weak texture region, that is, the No. 1 region is binarized with the other region of the image, that is, the No. 2 region, as shown in FIG. 7, the weak texture located at the upper right of the image. The area is displayed in white and the other areas in the image are displayed in black. Usually, due to the influence of noise, some of the pixels in the weak texture region are mistakenly considered to be not in the weak texture region, resulting in voids in the detected weak texture region, such as the black dots in the white region in FIG.
为了获取所述弱纹理区域的边界像素点,所述边缘深度获取模块303会采用区域空洞填充算法将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。弱纹理区域进行区域空洞填充完成后的图像如图8所示。In order to obtain the boundary pixel points of the weak texture region, the edge depth acquisition module 303 uses the region hole filling algorithm to perform the region hole filling on the binarized weak texture region to obtain the void-filled weak texture region. The image after the area filling is completed in the weak texture area is shown in Fig. 8.
此时就可以对图8进行轮廓提取,由于黑白对比分明,所述边缘深度获取模块303可以容易提取到弱纹理区域的轮廓线,其轮廓线如图9中的线条所示。根据所述弱纹理区域的轮廓线就可以获取所述弱纹理区域的边界像素点。At this time, the contour extraction can be performed on FIG. 8. Since the black and white contrast is clearly defined, the edge depth acquisition module 303 can easily extract the outline of the weak texture region, and the outline thereof is as shown by the line in FIG. The boundary pixel points of the weak texture region can be acquired according to the contour line of the weak texture region.
边缘深度获取模块303提取到所述弱纹理区域的边界像素点后,可以应用立体匹配算法获取所述边界像素点的深度值。After the edge depth obtaining module 303 extracts the boundary pixel points of the weak texture region, a stereo matching algorithm may be applied to obtain the depth value of the boundary pixel point.
立体匹配算法的输入为若干不同视角的数码摄像头采集的图像,输出是这些图像上的点的对应关系。假设为标准配置下双目立体视觉的几何模型,c和c'为两相机的光心,f为焦距,T为两光心的连线即两个数码摄像头之间的间距,也称为基线,过光心且垂直于成像平面的直线称为光轴。所谓标准配置是指两个相机的光轴垂直于基线且互相平行。设两相机的焦距相等都为f,且相机的坐标系的水平坐标与基线方向平行,则空间中的点P在两相机上成的像具有相同的竖直坐标,这个特点也叫立体视觉的外极线(Epipolar Line)(所谓的外极线是指外极平面和图像平面的交线,其中外极平面是包含两个焦点和空间点的平面)约束。对于一般配置的相机,通过相机标定和配准,可以得到标准配置下的图像。设P点投影到两相机后的图像分别为x和x',x和x'是一对对应点。如果用x和x'来表示它们的水平坐标,这两个点的对应关系可以由如下定义的视差来描述: The input of the stereo matching algorithm is an image acquired by a plurality of digital cameras of different viewing angles, and the output is a correspondence of points on the images. Assuming a geometric model of binocular stereo vision in a standard configuration, c and c' are the optical centers of the two cameras, f is the focal length, and T is the line connecting the two optical centers, that is, the spacing between the two digital cameras, also called the baseline. A line that passes through the optical center and is perpendicular to the imaging plane is called the optical axis. The so-called standard configuration means that the optical axes of the two cameras are perpendicular to the baseline and parallel to each other. Let the focal lengths of the two cameras be equal to f, and the horizontal coordinate of the coordinate system of the camera is parallel to the baseline direction, then the point P in the space has the same vertical coordinate on the images formed by the two cameras. This feature is also called stereoscopic vision. The Epipolar Line (the so-called outer pole line refers to the intersection of the outer pole plane and the image plane, where the outer pole plane is a plane containing two focal points and spatial points). For cameras with a typical configuration, images can be obtained in standard configuration by camera calibration and registration. The image after P point projection to the two cameras is x and x', respectively, and x and x' are a pair of corresponding points. If x and x' are used to represent their horizontal coordinates, the correspondence between the two points can be described by the parallax defined as follows:
视差d=x-x'Parallax d=x-x'
通过简单的几何关系推导,我们可以得到如下等式:By deriving a simple geometric relationship, we can get the following equation:
Figure PCTCN2016101602-appb-000006
其中Z表示对应点的深度。
Figure PCTCN2016101602-appb-000006
Where Z represents the depth of the corresponding point.
可见当基线和焦距固定的时候,也就是相机的参数以及相机之间的相对位置和姿态固定不变的时候,视差d与空间的点的深度Z成反比。因此,只需要知道了像素点的视差就可以得到该像素点的深度。It can be seen that when the baseline and the focal length are fixed, that is, the parameters of the camera and the relative position and posture between the cameras are fixed, the parallax d is inversely proportional to the depth Z of the point of the space. Therefore, it is only necessary to know the parallax of the pixel to obtain the depth of the pixel.
边缘深度获取模块303可以使用立体匹配算法获得弱纹理区域的边界像素点的视差d,使用以下公式计算出所述弱纹理区域的边界像素点的Z:
Figure PCTCN2016101602-appb-000007
The edge depth acquisition module 303 may obtain the disparity d of the boundary pixel points of the weak texture region using a stereo matching algorithm, and calculate the Z of the boundary pixel point of the weak texture region using the following formula:
Figure PCTCN2016101602-appb-000007
应用立体匹配算法计算弱纹理区域的像素点的深度值时,由于弱纹理区域内的像素点在颜色和亮度上比较相似,这就给像素点的匹配带来了奇异性,应用立体匹配算法容易误匹配,这样获取的弱纹理区域的深度信息就不准确。但是对于弱纹理区域的边界像素点来说,边界像素点与弱纹理区域内部的像素点在颜色和亮度上都不相同,应用立体匹配算法不容易误匹配,这样获取的弱纹理区域的边界像素点的深度值就比较准确。When the stereo matching algorithm is used to calculate the depth value of the pixel points in the weak texture region, since the pixels in the weak texture region are similar in color and brightness, this brings singularity to the matching of the pixel points, and the stereo matching algorithm is easy to apply. Mismatching, the depth information of the weak texture regions thus obtained is not accurate. However, for the boundary pixel points of the weak texture region, the pixel points inside the boundary pixel and the weak texture region are different in color and brightness, and the stereo matching algorithm is not easy to mismatch, so the boundary pixels of the obtained weak texture region are obtained. The depth value of the point is more accurate.
所述区域深度获取模块304,配置为根据所述边缘深度获取模块303获取的边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值。The area depth obtaining module 304 is configured to calculate a depth value of each pixel point in the weak texture area according to the depth value of the boundary pixel point acquired by the edge depth acquiring module 303.
所述区域深度获取模块304可以直接根据所述边缘深度获取模块303获取的边界像素点的深度值,进行平面拟合计算出所述弱纹理区域中各像素点的深度值The region depth obtaining module 304 may directly calculate the depth value of each pixel in the weak texture region according to the depth value of the boundary pixel point acquired by the edge depth acquiring module 303.
由于立体匹配算法本身的弱点以及边界点的遮挡问题,会出现部分深度值不准确的突变像素点,此时为了获取更加准确的深度值;所述区域深度获取模块304,还配置为根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。 Due to the weakness of the stereo matching algorithm itself and the occlusion problem of the boundary point, abrupt pixel points with inaccurate partial depth values may occur. In this case, in order to obtain a more accurate depth value, the regional depth obtaining module 304 is further configured to The depth value of the boundary pixel is filtered to remove the abrupt point in the boundary pixel to obtain a reliable point in the boundary pixel; the depth value of the reliable point is plane-fitted, and the weak texture region is calculated The depth value of each pixel.
所述区域深度获取模块304具体可以利用RANSAC算法筛除所述边界像素点中的突变点。The region depth obtaining module 304 may specifically filter out a sudden change point in the boundary pixel by using a RANSAC algorithm.
随机抽样一致(RANSAC,RANdom SAmple Consensus)算法,是根据一组包含异常数据的样本数据集,计算出数据的数学模型参数,得到有效样本数据的算法。RANSAC算法经常用于计算机视觉中。The RANSAC (RANdom SAmple Consensus) algorithm is an algorithm for calculating valid mathematical sample parameters based on a set of sample data sets containing abnormal data. The RANSAC algorithm is often used in computer vision.
RANSAC算法的基本假设是样本中包含正确数据(inliers)即可以被模型描述的数据,也包含异常数据(outliers)即偏离正常范围很远、无法适应数学模型的数据,即数据集中含有噪声。这些异常数据可能是由于错误的测量、错误的假设、错误的计算等产生的。同时RANSAC也假设,给定一组正确的数据,存在可以计算出符合这些数据的模型参数的方法。The basic assumption of the RANSAC algorithm is that the sample contains the correct data (inliers), which can be described by the model. It also contains outliers, that is, data that is far from the normal range and cannot adapt to the mathematical model, that is, the data set contains noise. These anomalous data may be due to erroneous measurements, incorrect assumptions, incorrect calculations, and the like. At the same time, RANSAC also assumes that given a correct set of data, there is a way to calculate the model parameters that match those data.
RANSAC算法的基本思想描述如下:The basic idea of the RANSAC algorithm is described as follows:
①考虑一个最小抽样集的势为n的模型(n为初始化模型参数所需的最小样本数)和一个样本集P,集合P的样本数#(P)>n,从P中随机抽取包含n个样本的P的子集S初始化模型M;1 Consider a model with a minimum sampling set of potential n (n is the minimum number of samples required to initialize the model parameters) and a sample set P, the number of samples of the set P#(P)>n, randomly extracted from P containing n a subset of P of the sample S initializes the model M;
②余集SC=P\S中与模型M的误差小于某一设定阈值t的样本集以及S构成S*。S*认为是内点集,它们构成S的一致集(Consensus Set);2 The set of samples in SC=P\S with the error of model M being less than a certain set threshold t and S constitute S*. S* is considered to be an inner set of points, which constitute a Consistus Set of S;
③若#(S*)≥N,认为得到正确的模型参数,并利用集S*(内点inliers)采用最小二乘等方法重新计算新的模型M*;重新随机抽取新的S,重复以上过程。3 If #(S*)≥N, think that the correct model parameters are obtained, and use the set S* (inners inliers) to recalculate the new model M* by least squares method; re-randomly extract new S, repeat above process.
④在完成一定的抽样次数后,若未找到一致集则算法失败,否则选取抽样后得到的最大一致集判断内外点,算法结束。4 After completing a certain number of sampling times, if the consistency set is not found, the algorithm fails. Otherwise, the largest uniform set obtained after sampling is selected to judge the inner and outer points, and the algorithm ends.
在本实施例中,所述区域深度获取模块304,还配置为将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集; 当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重复以上过程;在重复一定次数(如5-10次)后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。n为预设数值,可以为P中样本点数目的60%-80%,N值也为预设值,可以为P中样本点数目的90%。In this embodiment, the region depth obtaining module 304 is further configured to use the depth value of the boundary pixel as the sample set P, and randomly extract the depth values of the n boundary pixel points from the sample set P as the subset S. And obtaining an initialization model M by plane fitting; dividing a depth value of a boundary pixel point in the residual set SC=P\S that is smaller than a second threshold of the initialization model M into an inner point set; When the number of depth values in the inner point reaches N, the new model M* is recalculated according to the inner point set by least squares method; the new subset S* is re-randomly extracted, and the above process is repeated; After -10 times, selecting the obtained maximum inner point set, the depth value in the maximum inner point set is the depth value of the reliable point in the boundary pixel point, and the remaining values in the sample set P are The depth value of the abrupt point in the boundary pixel, the n and N being preset values. n is a preset value, which can be 60%-80% of the number of sample points in P, and the N value is also a preset value, which can be 90% of the number of sample points in P.
区域深度获取模块304可以将所述可靠点的深度值进行平面拟合,获得平面拟合方程,所述弱纹理区域中各像素点的深度值就可以通过该平面拟合方程计算出来。如图10所示为一个弱纹理区域的边界像素点的深度值进行的平面拟合图示,可以看到边界点拟合的平面覆盖了该弱纹理区域,该区域的其它像素点的深度值可以通过该平面拟合方程计算出来。The region depth obtaining module 304 may perform plane fitting on the depth value of the reliable point to obtain a plane fitting equation, and the depth value of each pixel point in the weak texture region may be calculated by using the plane fitting equation. As shown in FIG. 10, a plane fitting diagram of the depth values of the boundary pixel points of a weak texture region, it can be seen that the plane of the boundary point fitting covers the weak texture region, and the depth values of other pixels in the region are It can be calculated by the plane fitting equation.
在实际应用中,所述终端中的各个模块单元所实现的功能,均可由位于终端中的中央处理器(Central Processing Unit,CPU)、或微处理器(Micro Processor Unit,MPU)、或数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。In practical applications, the functions implemented by each module unit in the terminal may be implemented by a central processing unit (CPU), a microprocessor (Micro Processor Unit, MPU), or a digital signal located in the terminal. Implemented by a processor (Digital Signal Processor, DSP) or a Field Programmable Gate Array (FPGA).
图11为应用现有的立体匹配算法获得的深度图像,图12为应用本实施例提供的方法获得的弱纹理区域的深度图像以及应用现有的立体匹配算法获得的其他区域的深度图像;可以看到图6中标记处理来的弱纹理区域的深度图变得平滑,且正确率提升了。11 is a depth image obtained by applying the existing stereo matching algorithm, and FIG. 12 is a depth image of a weak texture region obtained by applying the method provided by the embodiment, and a depth image of another region obtained by applying the existing stereo matching algorithm; It is seen that the depth map of the weakly textured region processed by the mark in Fig. 6 becomes smooth, and the correct rate is improved.
应用本实施例终端可以准确获取弱纹理区域的深度信息,这样,在利用深度图像进行背景虚化时,在弱纹理区域,由于立体匹配算法的奇异性,使得弱纹理区域的深度值估计会出现错误,背景虚化的效果会受到影响,虚化效果不自然。利用本实施例的终端进行弱纹理区域的深度值估计,可以减少弱纹理区域的深度值估计的错误概率,让背景虚化效果更好。在利 用深度图像进行区域目标距离估计时,如果该目标区域为弱纹理区域,则利用匹配算法中奇异性的深度值估计的目标距离将会出错,利用本实施例的终端进行弱纹理区域的深度值估计,可以减少弱纹理区域的深度值估计的错误概率,使目标的距离估计更为准确;在利用深度图像进行图像分割时,如果目标和背景都含有若纹理区域,则利用匹配算法中奇异性的深度值进行分割的区域将会不准确,利用本实施例的终端进行弱纹理区域的深度值估计,可以减少弱纹理区域的深度值估计的错误概率,使得图像分割区域更加准确。The terminal of the present embodiment can accurately obtain the depth information of the weak texture region, so that when the background image is blurred by the depth image, in the weak texture region, the depth value estimation of the weak texture region occurs due to the singularity of the stereo matching algorithm. Errors, the effect of background blur will be affected, and the blur effect will be unnatural. By using the terminal of the embodiment to perform depth value estimation of the weak texture region, the error probability of the depth value estimation of the weak texture region can be reduced, and the background blur effect is better. In Lee When the target target region is estimated by the depth image, if the target region is a weak texture region, the target distance estimated by using the depth value of the singularity in the matching algorithm will be erroneous, and the depth value of the weak texture region is performed by using the terminal of the embodiment. It is estimated that the error probability of the depth value estimation of the weak texture region can be reduced, and the distance estimation of the target is more accurate; when the image segmentation is performed by using the depth image, if the target and the background both contain the texture region, the singularity in the matching algorithm is utilized. The area where the depth value is divided may be inaccurate. The depth value estimation of the weak texture area by using the terminal of the embodiment may reduce the error probability of the depth value estimation of the weak texture area, so that the image segmentation area is more accurate.
实施例2Example 2
本发明实施例提供了一种图像中弱纹理区域的深度信息获取方法,如图13所示,本实施例方法的处理流程包括以下步骤:An embodiment of the present invention provides a method for acquiring depth information of a weak texture region in an image. As shown in FIG. 13, the processing procedure of the method in this embodiment includes the following steps:
步骤1301、获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域。Step 1301: Acquire color and brightness information of an image, and divide the image into several regions according to the color and brightness information.
终端可以应用基于区域的分割方法如区域生长方法来对图像进行分割。区域生长的基本思想是将具有相似性质的像素集合起来构成区域。具体先对每个需要分割的区域找一个种子像素点作为生长的起点,然后将种子像素点周围中与种子像素点有相同或相似性质的像素(本实施例中是颜色和亮度信息相似的像素)合并到种子像素点所在的区域中。将这些新像素当作新的种子像素点继续进行上面的过程,直到再没有满足条件的像素可被包括进来。这样一个区域就长成了。The terminal may apply a region-based segmentation method such as a region growing method to segment the image. The basic idea of region growing is to group pixels with similar properties to form regions. Specifically, a seed pixel is searched for each of the regions to be segmented as a starting point for growth, and then pixels in the periphery of the seed pixel having the same or similar properties as the seed pixel (in this embodiment, pixels having similar color and luminance information) ) merged into the area where the seed pixel is located. These new pixels are treated as new seed pixels to continue the above process until no more pixels satisfying the condition can be included. Such an area will grow.
即根据所述颜色与亮度信息,将所述图像分割为若干区域,具体包括:选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的 像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。That is, dividing the image into a plurality of regions according to the color and brightness information, specifically: selecting a plurality of seed pixel points, and dividing a new pixel point satisfying a preset condition around the seed pixel point to the seed pixel point And treating the new pixel point as a new seed pixel, and continuing to divide a new pixel point satisfying the preset condition around the new seed pixel into an area where the seed pixel is located until the new There is no preset condition around the seed pixel a pixel, obtaining a plurality of regions divided according to the plurality of seed pixels; wherein the preset condition is that a difference between the color and the luminance information is within a first threshold compared to the seed pixel.
终端还可以利用meanshift算法,根据所述图像的颜色和亮度信息将所述图像进行分割,获取到若干区域。The terminal can also use the meanshift algorithm to segment the image according to the color and brightness information of the image to obtain several regions.
Mean Shift算法是一种有效的统计迭代算法,基于Mean Shift算法的图像分割也是一种基于区域的分割方法,这种分割方法跟人眼的对图像的分析特性极其相近,并且具有很强的适应性和鲁棒性。它对对图像的平滑区域和图像纹理区域并不敏感,所以能够得到很好的分割结果。此算法己经在计算机视觉领域得到了较为广泛的应用并取得了较大的成功。本实施例可以应用Mean Shift算法,将所述图像按照颜色和亮度信息分割为若干图像分割区域。Mean Shift algorithm is an effective statistical iterative algorithm. Image segmentation based on Mean Shift algorithm is also a region-based segmentation method. This segmentation method is very similar to the human eye's image analysis characteristics and has strong adaptability. Sex and robustness. It is not sensitive to the smooth area of the image and the image texture area, so it can get good segmentation results. This algorithm has been widely used in the field of computer vision and has achieved great success. This embodiment may apply the Mean Shift algorithm to segment the image into a plurality of image segmentation regions according to color and luminance information.
当然,终端在基于图像的颜色和亮度信息的情况下,还可以采用基于阈值的分割方法、基于边缘的分割方法、聚类分析方法等图割方法将该图像进行分割,本实施例采用的具体图像分割方法,在此并不做限制。Of course, in the case of image-based color and luminance information, the terminal may also use a threshold-based segmentation method, an edge-based segmentation method, a cluster analysis method, and the like to divide the image, and the specific embodiment is adopted. The image segmentation method is not limited here.
本实施例方法中终端是基于图像的颜色和亮度信息来进行图像分割的,分割后的图像分割区域的内部像素在颜色和亮度上特征都比较相近。示例的,将图4所示图像进行分割,不同图像分割区域用不同色块表示,效果如图5所示。In the method of the embodiment, the terminal performs image segmentation based on the color and brightness information of the image, and the internal pixels of the segmented image segmentation region are similar in color and brightness. For example, the image shown in FIG. 4 is segmented, and different image segmentation regions are represented by different color blocks, and the effect is as shown in FIG. 5.
步骤1302、计算获得所述图像对应的梯度信息,根据所述梯度信息从所述若干区域中选取出弱纹理区域。Step 1302: Calculate the gradient information corresponding to the image, and select a weak texture region from the plurality of regions according to the gradient information.
所述弱纹理区域为梯度统计平均值在预设范围内的区域。The weakly textured region is an area in which the gradient statistical average is within a preset range.
可以将图像看成二维离散函数I(i,j),(i,j)为图像中像素点的坐标,I(i,j)为像素点(i,j)的像素值(如:RGB值),所述图像的梯度信息其实就是这个二维离散函数的求导:The image can be regarded as a two-dimensional discrete function I(i,j), (i,j) is the coordinates of the pixel points in the image, and I(i,j) is the pixel value of the pixel point (i,j) (eg RGB) Value), the gradient information of the image is actually the derivation of this two-dimensional discrete function:
图像的梯度信息可以为:G(x,y)=dx(i,j)+dy(i,j); The gradient information of the image may be: G(x, y) = dx(i, j) + dy(i, j);
其中,dx(i,j)=I(i+1,j)-I(i,j);Where dx(i,j)=I(i+1,j)-I(i,j);
dy(i,j)=I(i,j+1)-I(i,j);Dy(i,j)=I(i,j+1)-I(i,j);
也可以用中值差分:You can also use the median difference:
dx(i,j)=[I(i+1,j)-I(i-1,j)]/2;Dx(i,j)=[I(i+1,j)-I(i-1,j)]/2;
dy(i,j)=[I(i,j+1)-I(i,j-1)]/2;Dy(i,j)=[I(i,j+1)-I(i,j-1)]/2;
以上只是举例说明最简单的梯度定义,其实还有更多更复杂的梯度公式。比如:Sobel、Roberts、kirsch、laplace、piewitt、robinson算子等。The above is just an example of the simplest gradient definition, but there are more and more complex gradient formulas. For example: Sobel, Roberts, kirsch, laplace, piewitt, robinson operators, etc.
图像的梯度大小可以反映出图像的像素的亮度以及颜色的频率变化大小,对于弱纹理区域,其内部像素点的亮度颜色比较相近,变化较小,相应的梯度值也比较小,按照该原理,对于图像分割成的这些区域,其中梯度统计平均值较小的区域即为弱纹理区域。The gradient size of the image can reflect the brightness of the pixels of the image and the frequency change of the color. For the weak texture region, the brightness of the internal pixel points is similar, the change is small, and the corresponding gradient value is relatively small. According to the principle, For these regions into which the image is divided, the region in which the gradient statistical average is small is the weak texture region.
本实施例中,终端可以根据现有的某种梯度算法可以计算获得所述图像对应的梯度信息,即获得所述图像中各个像素点对应的梯度,然后计算出所述若干图像分割区域内像素点对应的梯度统计平均值,选取梯度统计平均值在预设范围内的区域为弱纹理区域。预设范围为一个梯度统计平均值取值较小的范围如0-10,可根据实际情况来限定。In this embodiment, the terminal may calculate the gradient information corresponding to the image according to a certain gradient algorithm, that is, obtain a gradient corresponding to each pixel in the image, and then calculate pixels in the image segmentation region. The gradient statistical average corresponding to the point is selected as the weak texture region in the region where the gradient statistical average is within the preset range. The preset range is a gradient statistical average value, such as 0-10, which can be defined according to the actual situation.
示例的,对于图4所示的图像,存在如图6标示出的三个弱纹理区域。By way of example, for the image shown in Figure 4, there are three weakly textured regions as illustrated in Figure 6.
步骤1303、提取所述弱纹理区域的边界像素点,获取所述边界像素点的深度值。Step 1303: Extract boundary pixel points of the weak texture region, and obtain a depth value of the boundary pixel point.
终端可以先对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的边界像素点;按照以下公式计算获取所述边界像素点的深度 值Z:The terminal may first perform area marking on the weak texture area to obtain the marked weak texture area, and then binarize the marked weak texture area and other areas of the image to obtain a binarized weak texture area, and The binarized weakly textured region is filled with the region to obtain a weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the contour of the weakly textured region, according to the weak Obtaining a boundary pixel of the weak texture region; calculating a depth of the boundary pixel according to the following formula Value Z:
Figure PCTCN2016101602-appb-000008
Figure PCTCN2016101602-appb-000008
其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
区域标记就是把连续区域作同一个标记,常见的区域标记方法有四邻域标记算法和八邻域标记算法。The area mark is to mark the continuous area with the same mark. The common area mark method has four neighborhood mark algorithm and eight neighborhood mark algorithm.
二值化,就是将图像上的像素点的灰度值设置为0或255,也就是将整个图像呈现出明显的只有黑和白的视觉效果。Binarization is to set the gray value of the pixel on the image to 0 or 255, that is, to present the entire image with a distinct black and white visual effect.
对于图6所标示出的三个弱纹理区域中位于图像右上方的弱纹理区域,进行区域标记,即将图像右上方的弱纹理区域标记为1号区域,其他区域标记为2号区域;然后将标记后的弱纹理区域即1号区域与所述图像的其他区域即2号区域进行二值化,就如图7所示,位于图像右上方的弱纹理区域显示为白色,图像中的其他区域显示为黑色。通常由于噪声的影响,弱纹理区域中的部分像素点会被误认为不属于弱纹理区域,导致检测出的弱纹理区域内部出现空洞,如图7中的白色区域内的黑点。For the weak texture area located at the upper right of the image among the three weak texture areas indicated in FIG. 6, the area mark is performed, that is, the weak texture area on the upper right of the image is marked as the area No. 1, and the other areas are marked as the area No. 2; The marked weak texture region, that is, the No. 1 region, is binarized with the other region of the image, that is, the No. 2 region. As shown in FIG. 7, the weakly textured region located at the upper right of the image is displayed in white, and other regions in the image are displayed. Displayed in black. Usually, due to the influence of noise, some of the pixels in the weak texture region are mistakenly considered to be not in the weak texture region, resulting in voids in the detected weak texture region, such as the black dots in the white region in FIG.
为了获取所述弱纹理区域的边界像素点,终端会采用区域空洞填充算法将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。弱纹理区域进行区域空洞填充完成后的图像如图8所示。In order to obtain the boundary pixel points of the weak texture region, the terminal uses the region hole filling algorithm to perform the hole filling of the binarized weak texture region to obtain the weak texture region after the cavity filling. The image after the area filling is completed in the weak texture area is shown in Fig. 8.
此时就可以对图8进行轮廓提取,由于黑白对比分明,所述终端可以容易提取到弱纹理区域的轮廓线,其轮廓线如图9中的线条所示。根据所述弱纹理区域的轮廓线就可以获取所述弱纹理区域的边界像素点。At this time, the contour extraction can be performed on FIG. 8. Since the black and white contrast is clearly defined, the terminal can easily extract the outline of the weak texture region, and the outline thereof is as shown by the line in FIG. The boundary pixel points of the weak texture region can be acquired according to the contour line of the weak texture region.
所述获取所述边界像素点的深度值,包括:应用立体匹配算法获取所述边界像素点的深度值。The obtaining the depth value of the boundary pixel includes: applying a stereo matching algorithm to obtain a depth value of the boundary pixel.
立体匹配算法的输入为若干不同视角的数码摄像头采集的图像,输出 是这些图像上的点的对应关系。假设为标准配置下双目立体视觉的几何模型,c和c'为两相机的光心,f为焦距,T为两光心的连线即两个数码摄像头之间的间距,也称为基线,过光心且垂直于成像平面的直线称为光轴。所谓标准配置是指两个相机的光轴垂直于基线且互相平行。设两相机的焦距相等都为f,且相机的坐标系的水平坐标与基线方向平行,则空间中的点P在两相机上成的像具有相同的竖直坐标,这个特点也叫立体视觉的外极线(Epipolar Line)(所谓的外极线是指外极平面和图像平面的交线,其中外极平面是包含两个焦点和空间点的平面)约束。对于一般配置的相机,通过相机标定和配准,可以得到标准配置下的图像。设P点投影到两相机后的图像分别为x和x',x和x'是一对对应点。如果用x和x'来表示它们的水平坐标,这两个点的对应关系可以由如下定义的视差来描述:The input of the stereo matching algorithm is an image captured by a digital camera with different viewing angles, and the output is output. Is the correspondence of points on these images. Assuming a geometric model of binocular stereo vision in a standard configuration, c and c' are the optical centers of the two cameras, f is the focal length, and T is the line connecting the two optical centers, that is, the spacing between the two digital cameras, also called the baseline. A line that passes through the optical center and is perpendicular to the imaging plane is called the optical axis. The so-called standard configuration means that the optical axes of the two cameras are perpendicular to the baseline and parallel to each other. Let the focal lengths of the two cameras be equal to f, and the horizontal coordinate of the coordinate system of the camera is parallel to the baseline direction, then the point P in the space has the same vertical coordinate on the images formed by the two cameras. This feature is also called stereoscopic vision. The Epipolar Line (the so-called outer pole line refers to the intersection of the outer pole plane and the image plane, where the outer pole plane is a plane containing two focal points and spatial points). For cameras with a typical configuration, images can be obtained in standard configuration by camera calibration and registration. The image after P point projection to the two cameras is x and x', respectively, and x and x' are a pair of corresponding points. If x and x' are used to represent their horizontal coordinates, the correspondence between the two points can be described by the parallax defined as follows:
视差d=x-x'Parallax d=x-x'
通过简单的几何关系推导,我们可以得到如下等式:By deriving a simple geometric relationship, we can get the following equation:
Figure PCTCN2016101602-appb-000009
其中Z表示对应点的深度。
Figure PCTCN2016101602-appb-000009
Where Z represents the depth of the corresponding point.
可见当基线和焦距固定的时候,也就是相机的参数以及相机之间的相对位置和姿态固定不变的时候,视差d与空间的点的深度Z成反比。因此,只需要知道了像素点的视差就可以得到该像素点的深度。It can be seen that when the baseline and the focal length are fixed, that is, the parameters of the camera and the relative position and posture between the cameras are fixed, the parallax d is inversely proportional to the depth Z of the point of the space. Therefore, it is only necessary to know the parallax of the pixel to obtain the depth of the pixel.
终端可以使用立体匹配算法获得弱纹理区域的边界像素点的视差d,使用以下公式计算出所述弱纹理区域的边界像素点的Z:
Figure PCTCN2016101602-appb-000010
The terminal may obtain the disparity d of the boundary pixel points of the weak texture region using a stereo matching algorithm, and calculate the Z of the boundary pixel point of the weak texture region using the following formula:
Figure PCTCN2016101602-appb-000010
应用立体匹配算法计算弱纹理区域的像素点的深度值时,由于弱纹理区域内的像素点在颜色和亮度上比较相似,这就给像素点的匹配带来了奇异性,应用立体匹配算法容易误匹配,这样获取的弱纹理区域的深度信息就不准确。但是对于弱纹理区域的边界像素点来说,边界像素点与弱纹理区域内部的像素点在颜色和亮度上都不相同,应用立体匹配算法不容易误匹配,这样获取的弱纹理区域的边界像素点的深度值就比较准确。 When the stereo matching algorithm is used to calculate the depth value of the pixel points in the weak texture region, since the pixels in the weak texture region are similar in color and brightness, this brings singularity to the matching of the pixel points, and the stereo matching algorithm is easy to apply. Mismatching, the depth information of the weak texture regions thus obtained is not accurate. However, for the boundary pixel points of the weak texture region, the pixel points inside the boundary pixel and the weak texture region are different in color and brightness, and the stereo matching algorithm is not easy to mismatch, so the boundary pixels of the obtained weak texture region are obtained. The depth value of the point is more accurate.
步骤1304、根据所述边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值。Step 1304: Calculate a depth value of each pixel in the weak texture region according to the depth value of the boundary pixel.
终端可以直接根据获取的边界像素点的深度值,进行平面拟合计算出所述弱纹理区域中各像素点的深度值。The terminal may directly calculate the depth value of each pixel in the weak texture region according to the depth value of the acquired boundary pixel.
由于立体匹配算法本身的弱点以及边界点的遮挡问题,会出现部分深度值不准确的突变像素点,此时为了获取更加准确的深度值;所述终端可以根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。Due to the weakness of the stereo matching algorithm itself and the occlusion problem of the boundary point, a sudden pixel point with inaccurate partial depth values may occur. In this case, in order to obtain a more accurate depth value, the terminal may screen according to the depth value of the boundary pixel point. In addition to the abrupt point in the boundary pixel, a reliable point in the boundary pixel is obtained; the depth value of the reliable point is plane-fitted, and the depth value of each pixel in the weak texture region is calculated.
可选的,所述根据所述边界像素点的深度值筛除所述边界像素点中的突变点,包括:根据所述边界像素点的深度值,利用RANSAC算法筛除所述边界像素点中的突变点。Optionally, the filtering the abrupt point in the boundary pixel according to the depth value of the boundary pixel includes: filtering the boundary pixel by using a RANSAC algorithm according to the depth value of the boundary pixel The point of mutation.
RANSAC算法是根据一组包含异常数据的样本数据集,计算出数据的数学模型参数,得到有效样本数据的算法。RANSAC算法经常用于计算机视觉中。The RANSAC algorithm is an algorithm that calculates the mathematical model parameters of the data based on a set of sample data sets containing abnormal data and obtains valid sample data. The RANSAC algorithm is often used in computer vision.
RANSAC算法的基本假设是样本中包含正确数据(inliers)即可以被模型描述的数据,也包含异常数据(outliers)即偏离正常范围很远、无法适应数学模型的数据,即数据集中含有噪声。这些异常数据可能是由于错误的测量、错误的假设、错误的计算等产生的。同时RANSAC也假设,给定一组正确的数据,存在可以计算出符合这些数据的模型参数的方法。The basic assumption of the RANSAC algorithm is that the sample contains the correct data (inliers), which can be described by the model. It also contains outliers, that is, data that is far from the normal range and cannot adapt to the mathematical model, that is, the data set contains noise. These anomalous data may be due to erroneous measurements, incorrect assumptions, incorrect calculations, and the like. At the same time, RANSAC also assumes that given a correct set of data, there is a way to calculate the model parameters that match those data.
RANSAC算法的基本思想描述如下:The basic idea of the RANSAC algorithm is described as follows:
①考虑一个最小抽样集的势为n的模型(n为初始化模型参数所需的最小样本数)和一个样本集P,集合P的样本数#(P)>n,从P中随机抽取包含n个样本的P的子集S初始化模型M;1 Consider a model with a minimum sampling set of potential n (n is the minimum number of samples required to initialize the model parameters) and a sample set P, the number of samples of the set P#(P)>n, randomly extracted from P containing n a subset of P of the sample S initializes the model M;
②余集SC=P\S中与模型M的误差小于某一设定阈值t的样本集以及S 构成S*。S*认为是内点集,它们构成S的一致集(Consensus Set);2 sets of samples in the SC=P\S and the model M whose error is less than a certain threshold t and S Form S*. S* is considered to be an inner set of points, which constitute a Consistus Set of S;
③若#(S*)≥N,认为得到正确的模型参数,并利用集S*(内点inliers)采用最小二乘等方法重新计算新的模型M*;重新随机抽取新的S,重复以上过程。3 If #(S*)≥N, think that the correct model parameters are obtained, and use the set S* (inners inliers) to recalculate the new model M* by least squares method; re-randomly extract new S, repeat above process.
④在完成一定的抽样次数后,若未找到一致集则算法失败,否则选取抽样后得到的最大一致集判断内外点,算法结束。4 After completing a certain number of sampling times, if the consistency set is not found, the algorithm fails. Otherwise, the largest uniform set obtained after sampling is selected to judge the inner and outer points, and the algorithm ends.
在本实施例中,终端可以将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集;当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重复以上过程;在重复一定次数(如5-10次)后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。n为预设数值,可以为P中样本点数目的60%-80%,N值也为预设值,可以为P中样本点数目的90%。In this embodiment, the terminal may use the depth value of the boundary pixel as the sample set P, randomly extract the depth value of the n boundary pixel points from the sample set P as the subset S, and obtain the initialization model by plane fitting. M; dividing the depth value of the boundary pixel point in the residual set SC=P\S with the error of the initialization model M less than the second threshold into an inner point set; when the number of inner point concentration depth values reaches N, according to The inner point set recalculates the new model M* by least squares method; the new subset S* is re-randomly extracted, and the above process is repeated; after repeating a certain number of times (such as 5-10 times), the obtained largest inner point set is selected. a depth value of the maximum inner point set is a depth value of a reliable point in the boundary pixel point, and a remaining value in the sample set P is a depth value of a sudden change point in the boundary pixel point, the n sum N is the default value. n is a preset value, which can be 60%-80% of the number of sample points in P, and the N value is also a preset value, which can be 90% of the number of sample points in P.
终端可以将所述可靠点的深度值进行平面拟合,获得平面拟合方程,所述弱纹理区域中各像素点的深度值就可以通过该平面拟合方程计算出来。如图10所示为一个弱纹理区域的边界像素点的深度值进行的平面拟合图示,可以看到边界点拟合的平面覆盖了该弱纹理区域,该区域的其它像素点的深度值可以通过该平面拟合方程计算出来。The terminal may perform plane fitting on the depth value of the reliable point to obtain a plane fitting equation, and the depth value of each pixel in the weak texture region may be calculated by using the plane fitting equation. As shown in FIG. 10, a plane fitting diagram of the depth values of the boundary pixel points of a weak texture region, it can be seen that the plane of the boundary point fitting covers the weak texture region, and the depth values of other pixels in the region are It can be calculated by the plane fitting equation.
图11为应用现有的立体匹配算法获得的深度图像,图12为应用本实施例提供的方法获得的弱纹理区域的深度图像以及应用现有的立体匹配算法获得的其他区域的深度图像;可以看到图6中标记处理来的弱纹理区域的深度图变得平滑,且正确率提升了。 11 is a depth image obtained by applying the existing stereo matching algorithm, and FIG. 12 is a depth image of a weak texture region obtained by applying the method provided by the embodiment, and a depth image of another region obtained by applying the existing stereo matching algorithm; It is seen that the depth map of the weakly textured region processed by the mark in Fig. 6 becomes smooth, and the correct rate is improved.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。 The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.

Claims (20)

  1. 一种终端,包括:A terminal comprising:
    图像分割模块,配置为获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域;An image segmentation module configured to acquire color and brightness information of an image, and divide the image into a plurality of regions according to the color and brightness information;
    弱纹理区域获取模块,配置为计算获得所述图像对应的梯度信息,根据所述梯度信息从所述图像分割模块分割的若干区域中选取出弱纹理区域,所述弱纹理区域为梯度统计平均值在预设范围内的区域;a weak texture region acquiring module configured to calculate gradient information corresponding to the image, and select a weak texture region from the regions segmented by the image segmentation module according to the gradient information, where the weak texture region is a gradient statistical average An area within a preset range;
    边缘深度获取模块,配置为提取所述弱纹理区域获取模块选取的弱纹理区域的边界像素点,获取所述边界像素点的深度值;An edge depth obtaining module, configured to extract boundary pixel points of the weak texture region selected by the weak texture region acquiring module, and obtain a depth value of the boundary pixel point;
    区域深度获取模块,配置为根据所述边缘深度获取模块获取的边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值。The area depth obtaining module is configured to calculate a depth value of each pixel point in the weak texture area according to the depth value of the boundary pixel point acquired by the edge depth acquiring module.
  2. 根据权利要求1所述的方法,其中,所述弱纹理区域获取模块,还配置为根据梯度算法计算获得所述图像对应的梯度信息,所述梯度信息为所述图像中各个像素点对应的梯度;计算出所述若干图像分割区域内像素点对应的梯度统计平均值,选取梯度统计平均值在预设范围内的区域为弱纹理区域。The method according to claim 1, wherein the weak texture region obtaining module is further configured to obtain gradient information corresponding to the image according to a gradient algorithm, where the gradient information is a gradient corresponding to each pixel in the image. Calculating a gradient statistical average corresponding to the pixel points in the plurality of image segmentation regions, and selecting a region in which the gradient statistical average value is within the preset range is a weak texture region.
  3. 根据权利要求1所述的方法,其中,所述区域深度获取模块,还配置为根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。The method according to claim 1, wherein the region depth obtaining module is further configured to: screen out a sudden change point in the boundary pixel point according to a depth value of the boundary pixel point, to obtain the boundary pixel point a reliable point; planarly fitting the depth value of the reliable point to calculate a depth value of each pixel in the weak texture region.
  4. 根据权利要求1所述的终端,其中,所述图像分割模块,还配置为采用基于区域的分割方法、或者基于阈值的分割方法、或者基于边缘的分割方法、或者聚类分析方法,将所述图像分割为若干区域。The terminal according to claim 1, wherein the image segmentation module is further configured to adopt a region-based segmentation method, or a threshold-based segmentation method, or an edge-based segmentation method, or a cluster analysis method, The image is divided into several regions.
  5. 根据权利要求4所述的终端,其中,所述图像分割模块,还配置为选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划 分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。The terminal according to claim 4, wherein the image segmentation module is further configured to select a plurality of seed pixels to map a new pixel around the seed pixel to meet a preset condition. Dividing into the region where the seed pixel is located, treating the new pixel point as a new seed pixel point, and continuing to divide a new pixel point satisfying the preset condition around the new seed pixel point to the seed pixel point An area in which the pixel points satisfying the preset condition are not present around the new seed pixel, and acquiring a plurality of regions according to the plurality of seed pixel points; wherein the preset condition is the seed The difference between the color and luminance information is within the first threshold compared to the pixel.
  6. 根据权利要求1所述的终端,其中,所述边缘深度获取模块,还配置为对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的边界像素点;按照以下公式计算获取所述边界像素点的深度值Z:The terminal according to claim 1, wherein the edge depth obtaining module is further configured to perform area marking on the weak texture area to obtain a marked weak texture area, and then to mark the weak texture area and the image. The other regions are binarized to obtain the weakened texture region after binarization, and the binarized weak texture region is filled with the region to obtain the weakly textured region after the cavity is filled, and the weak texture after the cavity is filled The contour is extracted from the region to obtain the contour of the weak texture region, and the boundary pixel of the weak texture region is obtained according to the contour of the weak texture region; and the depth value Z of the boundary pixel is obtained according to the following formula:
    Figure PCTCN2016101602-appb-100001
    Figure PCTCN2016101602-appb-100001
    其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  7. 根据权利要求6所述的终端,其中,所述区域标记是指:把连续区域作同一个标记;The terminal according to claim 6, wherein the area mark means: making the continuous area the same mark;
    所述边缘深度获取模块,还配置为采用四邻域标记算法或者八邻域标记算法,对所述弱纹理区域进行区域标记获得标记后的弱纹理区域。The edge depth obtaining module is further configured to perform a region marking on the weak texture region to obtain a marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
  8. 根据权利要求6所述的终端,其中,所述边缘深度获取模块,还配置为采用区域空洞填充算法,将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。The terminal according to claim 6, wherein the edge depth obtaining module is further configured to adopt an area hole filling algorithm, and perform the hole filling after the binarized weak texture area to obtain the hole-filled weak texture area.
  9. 根据权利要求1所述的终端,其中,所述边缘深度获取模块,还配置为应用立体匹配算法获取所述边界像素点的深度值。 The terminal according to claim 1, wherein the edge depth obtaining module is further configured to apply a stereo matching algorithm to acquire a depth value of the boundary pixel.
  10. 根据权利要求3所述的终端,其中,所述区域深度获取模块,还配置为将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集;当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重复以上过程;在重复一定次数后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。The terminal according to claim 3, wherein the region depth obtaining module is further configured to extract the depth value of the n boundary pixel points from the sample set P by using the depth value of the boundary pixel as the sample set P. As the subset S, and obtaining the initialization model M by plane fitting; dividing the depth value of the boundary pixel point in the residual set SC=P\S with the error of the initialization model M smaller than the second threshold into the inner point set; When the number of depth values in the inner point reaches N, the new model M* is recalculated according to the inner point set by least squares method; the new subset S* is randomly selected, and the above process is repeated; after repeated a certain number of times, the selected one is selected. a obtained maximum inner point set, wherein the depth value in the maximum inner point set is a depth value of a reliable point in the boundary pixel point, and the remaining value in the sample set P is a depth of a sudden change point in the boundary pixel point Value, the n and N are preset values.
  11. 一种图像中弱纹理区域的深度信息获取方法,所述方法包括:A method for acquiring depth information of a weak texture region in an image, the method comprising:
    获取图像的颜色和亮度信息,根据所述颜色与亮度信息,将所述图像分割为若干区域;Obtaining color and brightness information of the image, and dividing the image into a plurality of regions according to the color and brightness information;
    计算获得所述图像对应的梯度信息,根据所述梯度信息从所述若干区域中选取出弱纹理区域,所述弱纹理区域为梯度统计平均值在预设范围内的区域;Obtaining gradient information corresponding to the image, and selecting a weak texture region from the plurality of regions according to the gradient information, where the weak texture region is an area in which a gradient statistical average value is within a preset range;
    提取所述弱纹理区域的边界像素点,获取所述边界像素点的深度值;Extracting boundary pixel points of the weak texture region, and acquiring a depth value of the boundary pixel point;
    根据所述边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值。Determining a depth value of each pixel in the weak texture region according to the depth value of the boundary pixel.
  12. 根据权利要求11所述的方法,其中,所述计算获得所述图像对应的梯度信息,根据所述梯度信息从所述若干区域中选取出弱纹理区域,包括:The method according to claim 11, wherein the calculating obtains gradient information corresponding to the image, and selecting a weak texture region from the plurality of regions according to the gradient information, comprising:
    根据梯度算法计算获得所述图像对应的梯度信息,所述梯度信息为所述图像中各个像素点对应的梯度;Obtaining gradient information corresponding to the image according to a gradient algorithm, where the gradient information is a gradient corresponding to each pixel point in the image;
    计算出所述若干图像分割区域内像素点对应的梯度统计平均值,选取梯度统计平均值在预设范围内的区域为弱纹理区域。 Calculating a gradient statistical average corresponding to the pixel points in the plurality of image segmentation regions, and selecting a region in which the gradient statistical average value is within the preset range is a weak texture region.
  13. 根据权利要求11所述的方法,其中,所述根据所述边界像素点的深度值,计算出所述弱纹理区域中各像素点的深度值,包括:The method according to claim 11, wherein the calculating the depth value of each pixel in the weak texture region according to the depth value of the boundary pixel point comprises:
    根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点;将所述可靠点的深度值进行平面拟合,计算出所述弱纹理区域中各像素点的深度值。And filtering a sudden change point in the boundary pixel point according to the depth value of the boundary pixel point to obtain a reliable point in the boundary pixel point; performing plane fitting on the depth value of the reliable point to calculate the weak point The depth value of each pixel in the texture area.
  14. 根据权利要求11所述的方法,其中,所述根据所述颜色与亮度信息,将所述图像分割为若干区域,包括:The method according to claim 11, wherein said dividing said image into a plurality of regions according to said color and brightness information comprises:
    采用基于区域的分割方法、或者基于阈值的分割方法、或者基于边缘的分割方法、或者聚类分析方法,将所述图像分割为若干区域。The image is segmented into a plurality of regions using a region-based segmentation method, a threshold-based segmentation method, or an edge-based segmentation method or a cluster analysis method.
  15. 根据权利要求14所述的方法,其中,所述采用基于区域的分割方法,将所述图像分割为若干区域,包括:The method of claim 14, wherein the segmenting the image into a plurality of regions using a region-based segmentation method comprises:
    选取若干种子像素点,将所述种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,将所述新像素点当作新的种子像素点,继续将所述新的种子像素点周围满足预设条件的新像素点划分到所述种子像素点所在的区域,直到所述新的种子像素点周围不存在满足预设条件的像素点,获取到根据所述若干种子像素点划分出的若干区域;其中,所述预设条件为与所述种子像素点相比,颜色和亮度信息的差值在第一阈值内。Selecting a plurality of seed pixels, dividing a new pixel point satisfying the preset condition around the seed pixel point into an area where the seed pixel point is located, and treating the new pixel point as a new seed pixel point, and continuing to A new pixel point that satisfies a preset condition around the new seed pixel is divided into an area where the seed pixel point is located, until there is no pixel point satisfying the preset condition around the new seed pixel point, and the obtained a plurality of regions divided by the seed pixel; wherein the preset condition is that the difference between the color and the luminance information is within the first threshold compared to the seed pixel.
  16. 根据权利要求11所述的方法,其中,所述提取所述弱纹理区域的边界像素点,获取所述边界像素点的深度值,包括:The method of claim 11, wherein the extracting the boundary pixel points of the weak texture region and obtaining the depth value of the boundary pixel points comprises:
    对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,然后将标记后的弱纹理区域与所述图像的其他区域进行二值化获得二值化后的弱纹理区域,将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,将所述空洞填充后的弱纹理区域进行轮廓提取获取所述弱纹理区域的轮廓线,根据所述弱纹理区域的轮廓线获取所述弱纹理区域的 边界像素点;按照以下公式计算获取所述边界像素点的深度值Z:Performing area marking on the weak texture area to obtain the marked weak texture area, and then binarizing the marked weak texture area and other areas of the image to obtain a binarized weak texture area, and the second The weakened texture region is filled with the region to obtain the weakly textured region after the cavity is filled, and the weakly textured region after the cavity is filled for contour extraction to obtain the contour of the weakly textured region, according to the weak texture region The contour line acquires the weak texture region a boundary pixel; the depth value Z of the boundary pixel is obtained according to the following formula:
    Figure PCTCN2016101602-appb-100002
    Figure PCTCN2016101602-appb-100002
    其中,f是立体成像装置中两个数码摄像头的焦距,T是两个数码摄像头之间的间距,d为两个数码摄像头拍摄的两幅图像的视差图中所述边界像素点对应的视差值。Where f is the focal length of two digital cameras in the stereoscopic imaging device, T is the spacing between the two digital cameras, and d is the parallax corresponding to the boundary pixels in the disparity map of the two images taken by the two digital cameras value.
  17. 根据权利要求16所述的方法,其中,所述区域标记是指:把连续区域作同一个标记;The method according to claim 16, wherein said area mark means: making the continuous area the same mark;
    所述对所述弱纹理区域进行区域标记获得标记后的弱纹理区域,包括:And performing the area marking on the weak texture area to obtain the marked weak texture area, including:
    采用四邻域标记算法或者八邻域标记算法,对所述弱纹理区域进行区域标记获得标记后的弱纹理区域。The weak texture region is region-marked to obtain the marked weak texture region by using a four-neighbor labeling algorithm or an eight-neighbor labeling algorithm.
  18. 根据权利要求16所述的方法,其中,所述将所述二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域,包括:The method according to claim 16, wherein the performing the hole filling of the binarized weak texture region to obtain the void-filled weak texture region comprises:
    采用区域空洞填充算法,将二值化后的弱纹理区域进行区域空洞填充获得空洞填充后的弱纹理区域。The area void filling algorithm is used to fill the weakly textured area of the binarized area to obtain the weakly textured area after the cavity is filled.
  19. 根据权利要求11所述的方法,其中,所述获取所述边界像素点的深度值,包括:The method of claim 11, wherein the obtaining the depth value of the boundary pixel comprises:
    应用立体匹配算法获取所述边界像素点的深度值。A stereo matching algorithm is applied to obtain a depth value of the boundary pixel.
  20. 根据权利要求13所述的方法,其中,所述根据所述边界像素点的深度值筛除所述边界像素点中的突变点,获得所述边界像素点中的可靠点,包括:The method of claim 13, wherein the filtering the abrupt points in the boundary pixel points according to the depth value of the boundary pixel points to obtain a reliable point in the boundary pixel points comprises:
    将所述边界像素点的深度值作为样本集P,随机从样本集P中抽出n个边界像素点的深度值作为子集S,并通过平面拟合获得初始化模型M;将余集SC=P\S中与所述初始化模型M的误差小于第二阈值的边界像素点的深度值划分为内点集;当内点集中深度值的数目达到了N时,根据内点集采用最小二乘法重新计算新的模型M*;重新随机抽取新的子集S*,重 复以上过程;在重复一定次数后,选出获得的最大内点集,所述最大内点集中的深度值为所述边界像素点中的可靠点的深度值,所述样本集P中的其余数值为所述边界像素点中突变点的深度值,所述n和N为预设值。 Taking the depth value of the boundary pixel as the sample set P, randomly extracting the depth values of the n boundary pixel points from the sample set P as the subset S, and obtaining the initialization model M by plane fitting; the residual set SC=P The depth value of the boundary pixel point in the \S with the initialization model M whose error is less than the second threshold is divided into inner point sets; when the number of inner point concentration depth values reaches N, the least square method is used according to the inner point set. Calculate the new model M*; re-randomly extract the new subset S*, heavy Repeating the above process; after repeating a certain number of times, selecting the obtained maximum inner point set, the depth value of the maximum inner point set is a depth value of the reliable point in the boundary pixel point, and the rest of the sample set P The value is the depth value of the abrupt point in the boundary pixel, and the n and N are preset values.
PCT/CN2016/101602 2015-10-20 2016-10-09 Method and terminal for obtaining depth information of low-texture regions in image WO2017067390A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510685831.1A CN105354838B (en) 2015-10-20 2015-10-20 The depth information acquisition method and terminal of weak texture region in image
CN201510685831.1 2015-10-20

Publications (1)

Publication Number Publication Date
WO2017067390A1 true WO2017067390A1 (en) 2017-04-27

Family

ID=55330805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/101602 WO2017067390A1 (en) 2015-10-20 2016-10-09 Method and terminal for obtaining depth information of low-texture regions in image

Country Status (2)

Country Link
CN (1) CN105354838B (en)
WO (1) WO2017067390A1 (en)

Cited By (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108285866A (en) * 2018-01-18 2018-07-17 华南农业大学 A kind of incubator with image analysis function
CN109389644A (en) * 2017-08-10 2019-02-26 纵目科技(上海)股份有限公司 Parking stall line detecting method based on direction gradient enhancing
CN111369621A (en) * 2020-03-11 2020-07-03 西安应用光学研究所 Image positioning resolving method for mooring type lift-off platform
CN111402314A (en) * 2019-12-30 2020-07-10 香港光云科技有限公司 Material attribute parameter obtaining method and device
CN111476194A (en) * 2020-04-20 2020-07-31 海信集团有限公司 Detection method for working state of sensing module and refrigerator
CN111508017A (en) * 2020-04-08 2020-08-07 中导光电设备股份有限公司 Method and system for positioning mark center with weak contrast
CN111583376A (en) * 2020-06-04 2020-08-25 网易(杭州)网络有限公司 Method and device for eliminating black edge in illumination map, storage medium and electronic equipment
CN111932566A (en) * 2020-05-27 2020-11-13 杭州群核信息技术有限公司 Method, device and system for generating model contour map
CN111932576A (en) * 2020-07-15 2020-11-13 中国科学院上海微系统与信息技术研究所 Object boundary measuring method and device based on depth camera
CN111950543A (en) * 2019-05-14 2020-11-17 北京京东尚科信息技术有限公司 Target detection method and device
CN112102199A (en) * 2020-09-18 2020-12-18 贝壳技术有限公司 Method, device and system for filling hole area of depth image
CN112566177A (en) * 2019-09-25 2021-03-26 中国电信股份有限公司 Weak coverage area identification method and device and computer-readable storage medium
CN112749713A (en) * 2021-01-26 2021-05-04 海南职业技术学院 Big data image recognition system and method based on artificial intelligence
CN113838114A (en) * 2021-09-22 2021-12-24 中南大学 Blast furnace charge level depth estimation method and system based on edge defocus tracking
CN114240928A (en) * 2021-12-29 2022-03-25 湖南云箭智能科技有限公司 Board quality partition detection method, device and equipment and readable storage medium
CN114897773A (en) * 2022-03-31 2022-08-12 海门王巢家具制造有限公司 Distorted wood detection method and system based on image processing
CN115578357A (en) * 2022-10-21 2023-01-06 中国人民解放军战略支援部队信息工程大学 Medical image edge detection method and system based on quantum algorithm
CN116843689A (en) * 2023-09-01 2023-10-03 山东众成菌业股份有限公司 Method for detecting surface damage of fungus cover
CN117036445A (en) * 2023-10-08 2023-11-10 埃洛克航空科技(北京)有限公司 Depth estimation method, device, computer equipment and medium based on random distribution
CN117197130A (en) * 2023-11-03 2023-12-08 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117392162A (en) * 2023-12-11 2024-01-12 浙江托普云农科技股份有限公司 Visual-based watermelon section phenotype analysis method, system and device

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354838B (en) * 2015-10-20 2018-04-10 努比亚技术有限公司 The depth information acquisition method and terminal of weak texture region in image
CN105869167A (en) * 2016-03-30 2016-08-17 天津大学 High-resolution depth map acquisition method based on active and passive fusion
CN107636727A (en) * 2016-12-30 2018-01-26 深圳前海达闼云端智能科技有限公司 Target detection method and device
CN110770794A (en) * 2018-08-22 2020-02-07 深圳市大疆创新科技有限公司 Image depth estimation method and device, readable storage medium and electronic equipment
CN113627429A (en) * 2021-08-12 2021-11-09 深圳市爱培科技术股份有限公司 Low-texture region identification method and device of image, storage medium and equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447917A (en) * 2010-10-08 2012-05-09 三星电子株式会社 Three-dimensional image matching method and equipment thereof
CN103049906A (en) * 2012-12-07 2013-04-17 清华大学深圳研究生院 Image depth extraction method
CN103226821A (en) * 2013-04-27 2013-07-31 山西大学 Stereo matching method based on disparity map pixel classification correction optimization
CN104835165A (en) * 2015-05-12 2015-08-12 努比亚技术有限公司 Image processing method and image processing device
CN104867135A (en) * 2015-05-04 2015-08-26 中国科学院上海微系统与信息技术研究所 High-precision stereo matching method based on guiding image guidance
US20150254868A1 (en) * 2014-03-07 2015-09-10 Pelican Imaging Corporation System and methods for depth regularization and semiautomatic interactive matting using rgb-d images
CN105354838A (en) * 2015-10-20 2016-02-24 努比亚技术有限公司 Method and terminal for acquiring depth information of weak texture region in image

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8994722B2 (en) * 2011-02-14 2015-03-31 Mitsubishi Electric Research Laboratories, Inc. Method for enhancing depth images of scenes using trellis structures
US9153065B2 (en) * 2013-02-05 2015-10-06 Google Technology Holdings LLC System and method for adjusting image pixel color to create a parallax depth effect
CN104050682B (en) * 2014-07-09 2017-01-18 武汉科技大学 Image segmentation method fusing color and depth information

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447917A (en) * 2010-10-08 2012-05-09 三星电子株式会社 Three-dimensional image matching method and equipment thereof
CN103049906A (en) * 2012-12-07 2013-04-17 清华大学深圳研究生院 Image depth extraction method
CN103226821A (en) * 2013-04-27 2013-07-31 山西大学 Stereo matching method based on disparity map pixel classification correction optimization
US20150254868A1 (en) * 2014-03-07 2015-09-10 Pelican Imaging Corporation System and methods for depth regularization and semiautomatic interactive matting using rgb-d images
CN104867135A (en) * 2015-05-04 2015-08-26 中国科学院上海微系统与信息技术研究所 High-precision stereo matching method based on guiding image guidance
CN104835165A (en) * 2015-05-12 2015-08-12 努比亚技术有限公司 Image processing method and image processing device
CN105354838A (en) * 2015-10-20 2016-02-24 努比亚技术有限公司 Method and terminal for acquiring depth information of weak texture region in image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CAO, XIAOQIAN ET AL.: "Stereo Matching Based on Low-Texture Detection and Disparity Map Fusion", CHINESE JOURNAL OF SCIENTIFIC INSTRUMENT, vol. 34, no. 9, 30 September 2013 (2013-09-30), pages 2074 - 2079 *
WANG, ZENGFU ET AL.: "A region based stereo matching algorithm using cooperative optimization", COMPUTER VISION AND PATTERN RECONGNITION, 2008, pages 1 - 8, XP031297014, ISSN: 1063-6919 *

Cited By (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109389644B (en) * 2017-08-10 2024-02-13 纵目科技(上海)股份有限公司 Direction gradient enhancement-based parking space line detection method
CN109389644A (en) * 2017-08-10 2019-02-26 纵目科技(上海)股份有限公司 Parking stall line detecting method based on direction gradient enhancing
CN108285866A (en) * 2018-01-18 2018-07-17 华南农业大学 A kind of incubator with image analysis function
CN111950543A (en) * 2019-05-14 2020-11-17 北京京东尚科信息技术有限公司 Target detection method and device
CN112566177A (en) * 2019-09-25 2021-03-26 中国电信股份有限公司 Weak coverage area identification method and device and computer-readable storage medium
CN111402314A (en) * 2019-12-30 2020-07-10 香港光云科技有限公司 Material attribute parameter obtaining method and device
CN111369621A (en) * 2020-03-11 2020-07-03 西安应用光学研究所 Image positioning resolving method for mooring type lift-off platform
CN111369621B (en) * 2020-03-11 2023-03-24 西安应用光学研究所 Image positioning resolving method for mooring type lift-off platform
CN111508017A (en) * 2020-04-08 2020-08-07 中导光电设备股份有限公司 Method and system for positioning mark center with weak contrast
CN111508017B (en) * 2020-04-08 2023-11-03 中导光电设备股份有限公司 Method and system for positioning mark center with weak contrast
CN111476194A (en) * 2020-04-20 2020-07-31 海信集团有限公司 Detection method for working state of sensing module and refrigerator
CN111476194B (en) * 2020-04-20 2024-02-27 海信集团有限公司 Detection method for working state of sensing module and refrigerator
CN111932566A (en) * 2020-05-27 2020-11-13 杭州群核信息技术有限公司 Method, device and system for generating model contour map
CN111932566B (en) * 2020-05-27 2024-02-20 杭州群核信息技术有限公司 Model contour diagram generation method, device and system
CN111583376B (en) * 2020-06-04 2024-02-23 网易(杭州)网络有限公司 Method and device for eliminating black edge in illumination map, storage medium and electronic equipment
CN111583376A (en) * 2020-06-04 2020-08-25 网易(杭州)网络有限公司 Method and device for eliminating black edge in illumination map, storage medium and electronic equipment
CN111932576A (en) * 2020-07-15 2020-11-13 中国科学院上海微系统与信息技术研究所 Object boundary measuring method and device based on depth camera
CN111932576B (en) * 2020-07-15 2023-10-31 中国科学院上海微系统与信息技术研究所 Object boundary measuring method and device based on depth camera
CN112102199A (en) * 2020-09-18 2020-12-18 贝壳技术有限公司 Method, device and system for filling hole area of depth image
CN112749713B (en) * 2021-01-26 2024-03-29 海南职业技术学院 Big data image recognition system and method based on artificial intelligence
CN112749713A (en) * 2021-01-26 2021-05-04 海南职业技术学院 Big data image recognition system and method based on artificial intelligence
CN113838114B (en) * 2021-09-22 2023-08-29 中南大学 Blast furnace burden surface depth estimation method and system based on edge defocus tracking
CN113838114A (en) * 2021-09-22 2021-12-24 中南大学 Blast furnace charge level depth estimation method and system based on edge defocus tracking
CN114240928B (en) * 2021-12-29 2024-03-01 湖南云箭智能科技有限公司 Partition detection method, device and equipment for board quality and readable storage medium
CN114240928A (en) * 2021-12-29 2022-03-25 湖南云箭智能科技有限公司 Board quality partition detection method, device and equipment and readable storage medium
CN114897773A (en) * 2022-03-31 2022-08-12 海门王巢家具制造有限公司 Distorted wood detection method and system based on image processing
CN114897773B (en) * 2022-03-31 2024-01-05 上海途巽通讯科技有限公司 Method and system for detecting distorted wood based on image processing
CN115578357B (en) * 2022-10-21 2023-11-21 中国人民解放军战略支援部队信息工程大学 Medical image edge detection method and system based on quantum algorithm
CN115578357A (en) * 2022-10-21 2023-01-06 中国人民解放军战略支援部队信息工程大学 Medical image edge detection method and system based on quantum algorithm
CN116843689B (en) * 2023-09-01 2023-11-21 山东众成菌业股份有限公司 Method for detecting surface damage of fungus cover
CN116843689A (en) * 2023-09-01 2023-10-03 山东众成菌业股份有限公司 Method for detecting surface damage of fungus cover
CN117036445A (en) * 2023-10-08 2023-11-10 埃洛克航空科技(北京)有限公司 Depth estimation method, device, computer equipment and medium based on random distribution
CN117036445B (en) * 2023-10-08 2023-12-26 埃洛克航空科技(北京)有限公司 Depth estimation method, device, computer equipment and medium based on random distribution
CN117197130A (en) * 2023-11-03 2023-12-08 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117197130B (en) * 2023-11-03 2024-01-26 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117392162B (en) * 2023-12-11 2024-02-09 浙江托普云农科技股份有限公司 Visual-based watermelon section phenotype analysis method, system and device
CN117392162A (en) * 2023-12-11 2024-01-12 浙江托普云农科技股份有限公司 Visual-based watermelon section phenotype analysis method, system and device

Also Published As

Publication number Publication date
CN105354838B (en) 2018-04-10
CN105354838A (en) 2016-02-24

Similar Documents

Publication Publication Date Title
WO2017067390A1 (en) Method and terminal for obtaining depth information of low-texture regions in image
WO2017067526A1 (en) Image enhancement method and mobile terminal
WO2016180325A1 (en) Image processing method and device
CN106375596B (en) Device and method for prompting focusing object
US10580206B2 (en) Method and apparatus for constructing three-dimensional map
US9146299B2 (en) Method and apparatus for position estimation using trajectory
US9406137B2 (en) Robust tracking using point and line features
WO2017140182A1 (en) Image synthesis method and apparatus, and storage medium
WO2017050115A1 (en) Image synthesis method
CN106131450B (en) Image processing method and device and terminal
US10740946B2 (en) Partial image processing method, device, and computer storage medium
EP2874395A2 (en) Method, apparatus and computer program product for disparity estimation
US10621730B2 (en) Missing feet recovery of a human object from an image sequence based on ground plane detection
CN106846345B (en) Method, device and terminal for realizing interactive image segmentation
WO2017071542A1 (en) Image processing method and apparatus
WO2017206657A1 (en) Image processing method and device, mobile terminal, and computer storage medium
KR20160145465A (en) Apparatus and method for noise reduction in depth images during object segmentation
WO2018019128A1 (en) Method for processing night scene image and mobile terminal
WO2017041714A1 (en) Method and device for acquiring rgb data
CN106651867B (en) Method, device and terminal for realizing interactive image segmentation
WO2017088618A1 (en) Picture synthesis method and device
CN106886999B (en) Method, device and terminal for realizing interactive image segmentation
CN106898003B (en) Method, device and terminal for realizing interactive image segmentation
CN106875399B (en) Method, device and terminal for realizing interactive image segmentation
CN106846323B (en) Method, device and terminal for realizing interactive image segmentation

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: 16856823

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: 16856823

Country of ref document: EP

Kind code of ref document: A1