Patent Description:
Autonomous driving means driving a vehicle without a user input of a driver or a passenger. Such autonomous driving may be classified into levels in which the driver or the passenger monitors the driving environment and levels in which an autonomous driving system related to the vehicle monitors the driving environment. For example, the levels in which a driver or passenger monitors the driving environment includes Level <NUM> (drive assistance level) corresponding to a stage in which a steering assistance system or an acceleration/deceleration assistance system is executed in the vehicle, but the driver performs all functions related to the dynamic driving of the vehicle, and Level <NUM> (partial automation level) in which the steering assistance system or the acceleration/deceleration assistance system is executed in the vehicle, but monitoring of the driving environment is performed by the driver's operation. For example, the levels in which the autonomous driving system related to the vehicle monitors the driving environment includes Level <NUM> (conditional automation level) in which the autonomous driving system controls all aspects of operation related to driving, but the driver must control the vehicle when the autonomous driving system requests the driver's intervention, Level <NUM> (high automation level) in which the autonomous driving system related to the vehicle performs all of the key control of driving, monitoring of the driving environment, response in case of an emergency, and the like, but requires partial intervention by the driver, and Level <NUM> (full automation) in which the autonomous driving system related to the vehicle always perform driving in all road conditions and environments. In related prior art,<NPL>.

A vehicle capable of autonomous driving may identify a surrounding state based on a front image obtained through a camera. For example, in case of FCWS (forward collision warning system), a vehicle positioned in front of a driving lane of an ego vehicle is detected, and a collision time is calculated using the distance to the vehicle and the velocity of the ego vehicle, and notification is provided to the user. However, in case of a vehicle driving in a neighboring lane, it is difficult to calculate the exact full width because a vehicle area detected through the front image includes a side surface of the vehicle, and accordingly, there is a problem in that the calculation of the distance to the vehicle driving in the neighboring lane is inaccurate.

The technical problems to be achieved in this document are not limited to those described above, and other technical problems not mentioned herein will be clearly understood by those having ordinary knowledge in the art to which the present disclosure belongs, from the following description.

In particular, an electronic device provided in an autonomous vehicle according to an embodiment comprises a camera; a memory storing at least one instruction; and at least one processor operatively coupled with the camera; wherein the at least one processor is configured to, when the instructions are executed, obtain a front image in which the autonomous vehicle is driving through the camera, identify a target vehicle in the front image based on the vehicle detection model stored in the memory, generate a bounding box corresponding to the target vehicle in response to an identification of the target vehicle, generate a sliding window having a height equal to the height of the bounding box and having a width half of the width of the bounding box, divide the left area into the first area based on the middle position of the width of the sliding window and the right area into the second area based on the middle position, generate an extended bound box by expanding the same size as the first area to the left of the bounding box and expanding the same size as the second area to the right of the bounding box, obtain a sum of a pixel difference values between the first area and the second area for each shift by sequentially shifting the sliding window by a predefined pixel interval with respect to all of width of the extended bounding box, and identify the point at which the sum value is the minimum among the obtained sums.

A method of operating an electronic device provided in an autonomous vehicle according to an embodiment comprises obtaining a front image in which the autonomous vehicle is driving, identifying a target vehicle in the front image based on the vehicle detection model, generating a bounding box corresponding to the target vehicle in response to an identification of the target vehicle, generating a sliding window having a height equal to the height of the bounding box and having a width half of the width of the bounding box, dividing the left area into the first area based on the middle position of the width of the sliding window and the right area into the second area based on the middle position, generating an extended bound box by expanding the same size as the first area to the left of the bounding box and expanding the same size as the second area to the right of the bounding box, obtaining a sum of a pixel difference values between the first area and the second area for each shift by sequentially shifting the sliding window by a predefined pixel interval with respect to all of width of the extended bounding box, and identifying the point at which the sum value is the minimum among the obtained sums.

The effects that can be obtained from the present disclosure are not limited to those described above, and any other effects not mentioned herein will be clearly understood by those having ordinary knowledge in the art to which the present disclosure belongs, from the following description.

According to an electronic device for detecting a rear surface of a target vehicle and an operating method thereof according to an embodiment, by improving the accuracy of detecting the full width of the rear surface of the target vehicle driving in a neighboring lane of the ego vehicle, the accuracy of calculating the distance to the target vehicle can be improved, thereby providing an autonomous vehicle with improved safety.

<FIG> is a simplified block diagram of an electronic device <NUM> according to various embodiments.

Referring to <FIG>, the electronic device <NUM> includes a camera <NUM>, a processor <NUM>, a communication circuit <NUM>, a memory <NUM>, a sensing circuit <NUM>, and/or a display <NUM>.

According to an embodiment, the electronic device <NUM> is embedded in an autonomous vehicle. For example, the autonomous vehicle may be stationary or moving. In the following specification, for convenience of explanation, the electronic device <NUM> included in the vehicle may be described as a form of vehicle.

According to an embodiment, the processor <NUM> may control the overall operation of the electronic device <NUM>. The processor <NUM> may execute applications that provide an advertisement service, an Internet service, a game service, a multimedia service, and/or a navigation (or map) service, and the like. In various embodiments, the processor <NUM> may include a single processor core or may include a plurality of processor cores. For example, the processor <NUM> may include multi-cores such as dual-core, quad-core, hexa-core, and the like. According to an embodiment, the processor <NUM> may further include a cache memory positioned inside or outside. The processor <NUM> may receive instructions of other components of the electronic device <NUM>, interpret the received instructions, and perform calculations or process data according to the interpreted instructions. The processor <NUM> may process data or signals generated or occurred in the application. For example, the processor <NUM> may request a instruction, data, or signal from the memory <NUM> to execute or control the application. The processor <NUM> may record (or store) or update the instruction, data, or signal in the memory <NUM> to execute or control the application. The processor <NUM> may interpret and process a message, data, instruction, or signal received from the communication circuit <NUM>, the camera <NUM>, the sensing circuit <NUM>, the memory <NUM>, or the display <NUM>. For example, the processor <NUM> may generate a new message, data, instruction, or signal based on the received message, data, instruction, or signal. The processor <NUM> may provide the processed or generated message, data, instruction, or signal to the communication circuit <NUM>, the camera <NUM>, the sensing circuit <NUM>, the memory <NUM>, or the display <NUM>. According to an embodiment, all or part of the processor <NUM> may be electrically or operably coupled with or connected to other components (e.g., communication circuit <NUM>, camera <NUM>, sensing circuit <NUM>, memory <NUM>, or display <NUM>) in the electronic device <NUM>. According to an embodiment, the processor <NUM> may be configured with one or more processors. For example, the processor <NUM> may include AP (application processor) controlling upper layer programs such as application programs and the like, GPU (graphics processing unit) for configuring the screen displayed on the display <NUM> and controlling the screen, image signal processor for controlling the camera <NUM>, sensor hub for controlling the sensing circuit <NUM>, or CP (communication processor) for controlling the communication circuit <NUM>, and the like. Additionally, the processor <NUM> may include a hardware structure specialized for processing an artificial intelligence model. The artificial intelligence model may be generated through machine learning. Such learning may be performed, for example, in the electronic device <NUM> itself in which the artificial intelligence model is performed, or may be performed through a separate server. The learning algorithm may include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the above-described examples.

The artificial neural network may be one of DNN (deep neural network), CNN (convolutional neural network), RNN(recurrent neural network), RBM(restricted boltzmann machine), DBN(deep belief network), BRDNN(bidirectional recurrent deep neural network), deep Q-networks, or a combination of two or more thereof, but is not limited to the above-described example. In addition to the hardware structure, the artificial intelligence model may include a software structure, additionally or alternatively.

According to an embodiment, the communication circuit <NUM> may be used to generate a communication path between another electronic device (e.g., a server, an external electronic device, or a device embedded in a vehicle) and the electronic device <NUM>. For example, the communication circuit <NUM> may support a designated protocol capable of connecting with the other electronic device in a wired or wireless manner. For example, the communication circuit <NUM> may include HDMI (high-definition multimedia interface), a USB (universal serial bus) interface, an SD card interface, and an audio interface in association with connection terminals such as HDMI connector, USB connector, an SD card connector, or an audio connector (e.g., a headphone connector). For another example, the communication circuit <NUM> may include a module (or circuit) for at least one of a Bluetooth communication technique, a BLE (Bluetooth low energy) communication technique, a Wi-Fi (wireless fidelity) communication technique, a cellular or mobile communication technique, or a wired communication technique. The communication circuit <NUM> may include a GPS (global positioning system) communication circuit (or a GNSS communication circuit). The communication circuit <NUM> may transmit and receive a GPS signal. The GPS may include at least one of GLONASS (global navigation satellite system), Beidou Navigation Satellite System (hereinafter referred to as "Beidou"), QZSS(quasi-zenith satellite system), IRNSS(Indian reginal satellite system) or Galileo(the European global satellite-based navigation system) depending on an area of use or bandwidth. The communication circuit <NUM> may provide information or data received through the communication path from the other electronic device to the processor <NUM>. The communication circuit <NUM> may transmit information or data provided from the processor <NUM> to the other electronic device through the communication path.

According to an embodiment, the camera <NUM> may photograph a still image or a video of the front of the electronic device <NUM>. In various embodiments, the camera <NUM> may include at least one of one or more lenses (e.g., a lens assembly), an image sensor, a flash, an image stabilizer, or a buffer memory. According to an embodiment, the camera <NUM> may include a plurality of lens assemblies. For example, the plurality of lens assemblies may have the same lens properties (e.g., angle of view, focal distance, auto focus, f number, or optical zoom). For example, at least one of the plurality of lens assemblies may have a lens property distinct from at least the other one of the plurality of lens assemblies. For example, at least one of the plurality of lens assemblies may be configured for a wide-angle lens, and at least the other one of the plurality of lens assemblies may be configured for a telephoto lens. In various embodiments, the image sensor may obtain an image corresponding to the subject (e.g., an image related to a vehicle including the electronic device <NUM>) by converting light transmitted from the subject through the one or more lenses into an electrical signal. In an embodiment, the image sensor may include one image sensor selected from image sensors having different property, such as an RGB sensor, a BW (black and white) sensor, an IR sensor, or a UV sensor, a plurality of image sensors having the same property, or a plurality of image sensors having different property. Each image sensor included in the image sensor may be implemented as, for example, a CCD (charged coupled device) sensor or a CMOS (complementary metal oxide semiconductor) sensor.

In various embodiments, in response to the movement of camera <NUM> or electronic device <NUM>, the image stabilizer may move or control the one or more lenses or the image sensor in a specific direction (e.g., adjust the read-out timing, and the like) in order to at least partially compensate for a negative effect (e.g., image shaking) caused by the movement on an image which is being captured. In an embodiment, the image stabilizer may be implemented as an optical image stabilizer, and the movement may be detected using a gyro sensor (e.g., sensing circuit <NUM>) or an acceleration sensor (e.g., sensing circuit <NUM>) disposed inside or outside the electronic device <NUM> or camera <NUM>.

In various embodiments, the buffer memory may store at least a portion of an image obtained through the image sensor at least temporarily for a next image processing operation. For example, in case that obtaining of image is delayed according to the shutter or high-speed obtaining of a plurality of images is executed, the obtained original image (e.g., high-resolution image) may be stored in the buffer memory, and a copy image (e.g., low-resolution image) corresponding to the original image may be previewed through the display <NUM>. When a specified condition is satisfied after the preview (e.g., a user input or a system command), at least a portion of the original image stored in the buffer memory may be obtained and processed by the image signal processor. In an embodiment, the buffer memory may be configured as at least a portion of the memory <NUM>, or may be configured as a separate memory operating independently from the memory <NUM>. The memory <NUM> may store an instruction, a control command code, control data, or user data for controlling the electronic device <NUM>. For example, memory <NUM> may include an application, an OS (operating system), middleware, and/or a device driver.

The memory <NUM> may include one or more of a volatile memory or a non-volatile memory. The volatile memory may include a DRAM (dynamic random-access memory), a SRAM (static RAM), a SDRAM (synchronous DRAM), a PRAM (phase-change RAM), a MRAM (magnetic RAM), a RRAM (resistive RAM), a FeRAM (ferroelectric RAM), and the like. The nonvolatile memory may include a ROM (read only memory), a PROM (programmable ROM), a EPROM (electrically programmable ROM), a EEPROM (electrically erasable programmable ROM), a flash memory, and the like. The memory <NUM> may include a non-volatile medium such as a HDD (hard disk drive), a SSD (solid state disk), a eMMC(embedded multi-media card), and a UFS(universal flash storage).

According to an embodiment, the sensing circuit <NUM> may generate an electrical signal or data value corresponding to an internal operating state (e.g., power or temperature) of the electronic device <NUM> or an external environmental state of the electronic device <NUM>. For example, the sensing circuit <NUM> may include a radar sensor, a lidar sensor, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a velocity sensor (or a speedometer), a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.

In various embodiments, the sensing circuit <NUM> may include a transmitter configured to emit a signal (or pulse) and a receiver configured to receive a reflected signal for the signal. For example, the sensing circuit <NUM> may emit a signal (e.g., light) and receive a reflected signal under the control of the processor <NUM>. The sensing circuit <NUM> may identify the external environment of the electronic device <NUM> by analyzing the time until the reflected signal is received, the phase shift of the reflected signal, the pulse power of the reflected signal, and/or the pulse width of the reflected signal, and the like. For example, the external environment may correspond to the front of the electronic device <NUM>. For example, the sensing circuit <NUM> may be used to obtain distance information from the electronic device <NUM> to an object by measuring the time from after when the signal is emitted by the transmitter to when the signal is reflected and received by the receiver. For example, the sensing circuit <NUM> may include a radar sensor and/or a lidar sensor.

According to an embodiment, the display <NUM> may output content, data, or a signal. In various embodiments, the display <NUM> may display an image signal processed by the processor <NUM>. For example, the display <NUM> may display a captured or still image. For another example, the display <NUM> may display a video or a camera preview image. For another example, the display <NUM> may display a GUI (graphical user interface) so that the user may interact with the electronic device <NUM>. The display <NUM> may be configured with an LCD (liquid crystal display) or an OLED (organic light emitting diode). According to an embodiment, the display <NUM> may be configured with an integral touch screen by being coupled with a sensor capable of receiving a touch input and the like. In various embodiments, at least one of the communication circuit <NUM>, the camera <NUM>, or the sensing circuit <NUM> may be disposed outside the electronic device <NUM>.

<FIG> is a side view of a host vehicle including the electronic device <NUM> according to an embodiment of the present disclosure.

Referring to <FIG> and <FIG>, the host vehicle <NUM> may include the electronic device <NUM> and a vehicle control unit <NUM>. The host vehicle <NUM> may refer to an autonomous vehicle equipped with the electronic device <NUM>. For example, the host vehicle <NUM> may be referred to as various terms including an ego vehicle and a self-vehicle.

The vehicle control unit <NUM> may control overall driving of the host vehicle <NUM>. For example, information indicating a straight-line distance received from the distance estimating device <NUM> may be received, and based on this information, the velocity of the host vehicle <NUM> may be controlled. The straight-line distance may refer to a distance between the target vehicle and the host vehicle <NUM>.

The vehicle control unit <NUM> may identify that the straight-line distance to the target vehicle is less than or equal to the threshold distance. The vehicle control unit <NUM> may perform control to decrease the velocity of the host vehicle <NUM> in response to identifying a straight-line distance less than or equal to the threshold distance. To this end, the vehicle control unit <NUM> may generate a control signal instructing deceleration and transmit the control signal to the brake system.

<FIG> illustrates an example of an environment <NUM> including electronic devices according to various embodiments.

<FIG> illustrates an example of a training data set <NUM> according to various embodiments.

Referring to <FIG>, the environment <NUM> may include an electronic device <NUM>, an electronic device <NUM>, and an electronic device <NUM>.

In various embodiments, the electronic device <NUM> may be used to obtain a data set <NUM> for vehicle detection model <NUM> trained by the electronic device <NUM>. For example, the electronic device <NUM> may obtain an image including a visual object corresponding to the exterior of the vehicle. The electronic device <NUM> may obtain information about attributes about the visual object included in the obtained image or an area including the visual object, based on a user input. The electronic device <NUM> may provide the data set <NUM> to the electronic device <NUM>. Referring to <FIG>, the data set <NUM> provided to the electronic device <NUM> may include a plurality of images about the front vehicle <NUM>.

In various embodiments, the electronic device <NUM> may be used to train the vehicle detection model <NUM>. For example, the electronic device <NUM> may obtain the data set <NUM> from the electronic device <NUM>. The electronic device <NUM> may provide the data set <NUM> to the vehicle detection model <NUM>. For example, the vehicle detection model <NUM> may be a model trained by the electronic device <NUM> to provide the electronic device <NUM> included in the host vehicle <NUM> with information on whether there is a visual object corresponding to the exterior of the vehicle in the image obtained through the camera <NUM> related to the host vehicle <NUM>. For example, the vehicle detection model <NUM> may be stored in the electronic device <NUM> for the training. For another example, the vehicle detection model <NUM> may be communicatively connected to the electronic device <NUM> for the training.

The vehicle detection model <NUM> may obtain the data set <NUM> from the electronic device <NUM>. The vehicle detection model <NUM> may perform training based on the data set <NUM>. For example, the vehicle detection model <NUM> may perform training based on information about the image (or a portion of the image) in the data set and the attribute associated with the image (or a portion of the image) in the data set. While performing the training, the vehicle detection model <NUM> may extract feature points from the image (or a portion of the image) and may obtain relationship information between the extracted feature points and information about the attribute. For example, the extraction of the feature points may be performed based on grayscale intensity, RGB (red, green, blue) color information, HSV(hue, saturation, value) color information, YIQ color information, edge information (grayscale, binary, eroded binary), and the like.

In various embodiments, the vehicle detection model <NUM> may determine whether a visual object corresponding to the exterior of the vehicle is included in the image based on the relationship information. In case that the reliability of the determination reaches the reference reliability level or higher, the vehicle detection model <NUM> trained by the electronic device <NUM> may be related to the electronic device <NUM>. For example, the vehicle detection model <NUM> trained by the electronic device <NUM> may be included in the electronic device <NUM>. For another example, the vehicle detection model <NUM> trained by the electronic device <NUM> is a device distinct from the electronic device <NUM> and may be positioned in the host vehicle <NUM> and connected to the electronic device <NUM> by wireless or by wire. For another example, the vehicle detection model <NUM> trained by the electronic device <NUM> is a device distinct from the electronic device <NUM> and may be positioned outside the host vehicle <NUM> and connected to the electronic device <NUM> by wireless or by wire.

<FIG> illustrates an example in which the position of the camera <NUM> is positioned on the front surface of the vehicle, but this is for convenience of explanation. Depending on embodiments, the position of the camera <NUM> may be changed. For example, the camera <NUM> may be positioned on a dashboard or on a wind shied or on a room mirror of the vehicle. For another example, camera <NUM> may be positioned at an appropriate position on the rear of the vehicle.

<FIG> is a flowchart illustrating an operating method of an electronic device <NUM> according to various embodiments.

<FIG> illustrates an example of a front image and a bounding box obtained through a camera <NUM> according to various embodiments.

<FIG> illustrates a bounding box <NUM> and a sliding window <NUM> according to various embodiments.

<FIG> illustrates an extended bounding box <NUM> according to various embodiments.

<FIG> illustrates an example of inverting a second area of a sliding window <NUM> left and right according to various embodiments.

<FIG> illustrates an example of calculating a pixel difference value according to various embodiments.

<FIG> illustrates a graph illustrating a pixel difference value according to a position change of a sliding window <NUM> according to various embodiments.

<FIG> illustrates an example of detecting a center of a rear surface of a target vehicle according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may obtain a front image of the host vehicle <NUM>. For example, the processor <NUM> may photograph the front of the vehicle equipped with the electronic device <NUM> through the camera <NUM>. The vehicle equipped with the electronic device <NUM> may correspond to the host vehicle <NUM> of <FIG>. The front image may correspond to the image of <FIG>.

In operation <NUM>, the electronic device <NUM> identifies the target vehicle in the front image. Referring to <FIG> together, the processor <NUM> may identify a plurality of front vehicles based on the vehicle detection model. The processor <NUM> identifies at least one vehicle among the plurality of front vehicles as the target vehicle. For example, the processor <NUM> may set the front vehicle driving in the same lane as the host vehicle <NUM> as the target vehicle. For another example, the processor <NUM> may set a front vehicle driving in a lane neighboring the host vehicle <NUM> as the target vehicle. Hereinafter, in the detailed description, it will be described based on setting a front vehicle driving in a neighboring lane of the host vehicle <NUM> as the target vehicle.

In operation <NUM>, the electronic device <NUM> sets the bounding box corresponding to the target vehicle. The processor <NUM> may set the bounding box for each of the plurality of front vehicles detected in the front image by using the vehicle detection model. The bounding box may refer to a box having the smallest size surrounding the detected object. For example, referring to <FIG> together, the processor <NUM> may generate the two bounding boxes based on the front image. The processor <NUM> may generate the bounding box <NUM> for a front vehicle driving in a neighboring lane of the host vehicle <NUM>. The processor <NUM> may generate the bounding box <NUM> for a front vehicle driving in the same lane of the host vehicle <NUM>.

In operation <NUM>, the electronic device <NUM> generates the sliding window having the same height as the height of the bounding box <NUM> and the width of half the width of the bounding box <NUM>. Referring to <FIG> together, the processor <NUM> may set the front vehicle driving in the neighboring lane of the host vehicle <NUM> as the target vehicle and may generate the bounding box <NUM> having a minimum area including the target vehicle. For example, the width of the bounding box <NUM> may be w, and the height of the bounding box <NUM> may be h. Referring to <FIG> together, the processor <NUM> may generate the sliding window <NUM> in response to generation of the bounding box <NUM>. The sliding window <NUM> is shifted by a predefined pixel interval on an area at least overlapping the bounding box <NUM>. The sliding window <NUM> may be a window having a size smaller than that of the bounding box <NUM>. For example, the height of the sliding window <NUM> may be h, which is the same height as the bounding box <NUM>. The width of the sliding window <NUM> may be sw. The sw is half value of the width of the bounding box <NUM>, in other words, <NUM>.

In operation <NUM>, the electronic device <NUM> divides the left area into a first area and the right area into a second area based on the middle position of the width of the sliding window <NUM>. Referring to <FIG> together, the processor <NUM> may distinguish the sliding window into two areas. For example, the processor <NUM> identifies the left area of the sliding window <NUM> as the first area <NUM>. The processor <NUM> identifies the right area of the sliding window <NUM> as the second area <NUM>.

In operation <NUM>, the electronic device <NUM> generates an extended bounding box <NUM> by adding dummy areas <NUM> having half the size of the sliding window <NUM> to the left and right sides of the bounding box <NUM>, respectively. The expanded bounding box <NUM> corresponds to the entire area for which the sliding window <NUM> performs the symmetric comparison process. The processor <NUM> adds a dummy area <NUM> to the left area of the bounding box <NUM>. The size of the dummy area <NUM> is the same as that of the first area <NUM> of the sliding window <NUM>. Each of the pixels included in the dummy area <NUM> has a predetermined pixel value. The processor <NUM> sets pixels included in the dummy area <NUM> as an average value of all pixel values included in the bounding box <NUM>. The processor <NUM> adds the dummy area <NUM> to the right area of the bounding box <NUM>. The size of the dummy area <NUM> is the same as that of the second area <NUM> of the sliding window <NUM>. Each of the pixels included in the dummy area <NUM> has a predetermined pixel value. The processor <NUM> sets the pixels included in the dummy area <NUM> as an average value of all pixel values included in the bounding box <NUM>.

According to an alternative not comprised in the invention, the expanded bounding box <NUM> may correspond to h, which is the same height as the sliding window <NUM> and the bounding box <NUM>. The width of the expanded bounding box <NUM> may be <NUM> times that of the bounding box <NUM>, in other words, <NUM>. The width of the expanded bounding box <NUM> may be three times that of the sliding window <NUM>, in other words, 3sw.

In operation <NUM>, the electronic device <NUM> obtains the sums of the pixel difference values of the first area <NUM> and the second area <NUM> by shifting the sliding window <NUM> by a predefined pixel interval with respect to the entire width of the extended bounding box <NUM>. Referring to <FIG> together, the bounding box <NUM> may include all <NUM> pixels. At the viewpoint of (a), the sliding window <NUM> may be positioned on an area overlapping the bounding box <NUM>. For example, the first area <NUM> of the sliding window <NUM> may be positioned on "1x" pixels. For example, the second area <NUM> of the sliding window <NUM> may be positioned on "2x" pixels. The processor <NUM> may change the pixels of the second area <NUM> so that the second area <NUM> is inverted left and right in order to calculate a pixel difference value between the first area <NUM> and the second area <NUM>. For example, at the viewpoint of (b), the processor <NUM> may invert the second area <NUM> left and right. The processor <NUM> may substitute pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM> of the second area <NUM> with pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM>, respectively. For example, referring to <FIG>, the second area <NUM>-<NUM> may be changed to and displayed as the second area <NUM>-<NUM> based on the substitution. Thereafter, the processor <NUM> calculates difference values between pixels of the first area <NUM> and pixels of the left and right inverted second area <NUM>, respectively, and may sum the difference values. For example, the processor <NUM> may calculate a difference between the pixel value of the pixel <NUM> of the first area <NUM> and the pixel value of pixel <NUM> corresponding to the same position as the pixel <NUM>. The processor <NUM> may calculate <NUM> difference values for pixel <NUM> to pixel <NUM>, and may obtain a sum by summing the <NUM> difference values.

According to an embodiment, the processor <NUM> shifts the sliding window <NUM> by a predefined pixel interval. At the viewpoint (c), the sliding window <NUM> may be shifted to the right by one pixel compared to the viewpoint (a). Compared to the viewpoint (a), the first area <NUM> of the sliding window <NUM> may include pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM>. The second area <NUM> of the sliding window <NUM> may include pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM>. According to an embodiment, the processor <NUM> changes the pixels of the second area <NUM> so that the second area <NUM> is inverted left and right in order to calculate a pixel difference value between the first area <NUM> and the second area <NUM>. For example, at the viewpoint (d), the processor <NUM> may invert the second area <NUM> left and right. The processor <NUM> may substitute pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM> of the second area <NUM> with pixel <NUM>, pixel <NUM>, pixel <NUM>, and pixel <NUM>, respectively. Thereafter, the processor <NUM> calculates difference values between pixels of the first area <NUM> and pixels of the left and right inverted second area <NUM>, respectively, and sums the difference values. For example, the processor <NUM> may calculate a difference between the pixel value of the pixel <NUM> of the first area <NUM> and the pixel value of pixel <NUM> corresponding to the same position as the pixel <NUM>.

In the above-described embodiment, the pixels of the second area <NUM> have been described based on inverting left and right, but is not limited thereto. According to embodiments, pixels of the first area <NUM> are inverted to the left and right, and a difference between pixels of the first area <NUM> and the second area <NUM> is calculated.

In the above-described embodiment, the sliding window <NUM> is illustrated to be shifted from left to right, but is not limited thereto. According to various embodiments, the sliding window <NUM> may be shifted from the right to the left.

In operation <NUM>, the electronic device <NUM> identifies a position where the sum of the difference values between the pixels of the first area <NUM> and the pixels of the second area <NUM> is minimum. The processor <NUM> may identify the most left-right symmetrical point within the bounding box <NUM> by shifting the sliding window <NUM> along the bounding box <NUM>. The pixel difference value between the first area <NUM> of the sliding window <NUM> and the second area <NUM> inverted to left and right may be related to how left-right symmetrical the area included in the sliding window <NUM> is. For example, when the area corresponding to the sliding window <NUM> is perfectly left-right symmetrical, the difference between the pixels of the first area <NUM> and the pixels of the second area <NUM> inverted to the left and right may correspond to <NUM>. For example, looking at the rear of the vehicle, a point close to the left-right symmetry may be the center of the rear. In other words, a position where the sum of pixel difference values is minimum may correspond to the center of the target vehicle. Specifically, referring to <FIG>, the center x-axis <NUM> of the sliding window <NUM> where the sum of pixel difference values is minimum may be the center of the rear surface of the target vehicle.

<FIG> is a flowchart illustrating an operating method for determining a start position of a sliding window <NUM> according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify the coordinates of the center point of the bounding box <NUM>. For example, referring to <FIG> together, when the left lower corner of the bounding box <NUM> is set to (<NUM>, <NUM>), the coordinates of the center point may be (w/<NUM>, h/<NUM>). According to various embodiments, the processor <NUM> may omit the calculation on the y-axis in order to reduce the complexity of the operation.

In operation <NUM>, the electronic device <NUM> may determine whether the x-component of the identified coordinate is included in the left area in the front image. For example, referring to <FIG>, the bounding box <NUM> of the target vehicle driving in the lane neighboring the host vehicle <NUM> may be included in the left area based on the center x-axis of the front image. Since the bounding box <NUM> is already included in the left area of the front image, the x-coordinate of the center point of the bounding box <NUM> may also be included in the left area of the front image. For another example, in case that the target vehicle is driving in the right lane of the host vehicle <NUM>, the x-coordinate of the center point of the bounding box may be included in the right area in the front image.

In operation <NUM>, the electronic device <NUM> may perform the shift of the sliding window <NUM> starting from the left edge of the extended bounding box <NUM>. In operation <NUM>, the processor <NUM> may identify that the target vehicle corresponding to the bounding box <NUM> is driving in the left lane in case that the x-coordinate of the center point of the bounding box <NUM> is included in the left area of the front image. The processor <NUM> may estimate that the center x-axis of the rear of the target vehicle driving in the left lane is positioned on the left side within the bounding box <NUM>. Accordingly, when generating the sliding window <NUM> and starting the shift, the processor <NUM> may control the shift to start from the left peripheral of the extended bounding box <NUM>. For example, at the start of the shift, the sliding window <NUM> may include a left dummy area of the extended bounding box <NUM> and a portion of the bounding box <NUM>.

In operation <NUM>, the electronic device <NUM> may perform the shift the sliding window <NUM> starting from the right edge of the extended bounding box <NUM>. In operation <NUM>, the processor <NUM> may identify that the target vehicle corresponding to the bounding box <NUM> is driving in the right lane of the host vehicle <NUM> in case that the x-coordinate of the center point of the bounding box <NUM> is included in the right area of the front image. The processor <NUM> may estimate that the center x-axis of the rear of the target vehicle driving in the right lane is positioned on the right side within the bounding box <NUM>. Accordingly, when generating the sliding window <NUM> and starting the shift, the processor <NUM> may control the shift to start from the right peripheral of the extended bounding box <NUM>. For example, at the start of the shift, the sliding window <NUM> may include a right dummy area of the extended bounding box <NUM> and a portion of the bounding box <NUM>.

<FIG> is a flowchart illustrating an operating method of setting an area of interest according to various embodiments.

<FIG> is an example of setting an area of interest according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify the length from the identified middle position to the left edge of the bounding box <NUM>. The identified middle position may refer to the center x-axis of the sliding window <NUM> corresponding to the point where the sum is minimum. Referring to <FIG> together, the identified middle position may correspond to the position <NUM>. The processor <NUM> may identify the length from the identified position <NUM> to the left edge. Since the bounding box <NUM> is a box of a minimum size including an object of the target vehicle, the bounding box <NUM> may include images of a rear surface of the target vehicle and a side surface of the target vehicle. Accordingly, since the processor <NUM> has identified that the target vehicle is driving in the left lane of the host vehicle <NUM>, the processor <NUM> may identify the length from the identified position <NUM> to the left edge of the bounding box <NUM>. The identified length may correspond to the length of the left half of the rear surface of the target vehicle.

In operation <NUM>, the electronic device <NUM> may set an area having twice the width of the identified length and the same height as the height of the bounding box <NUM> as the region of interest <NUM>. Referring to <FIG>, since the length identified in operation <NUM> corresponds to the left half of the rear surface of the target vehicle, the processor <NUM> may set an area having a width twice the identified length and a height h equal to that of the bounding box <NUM> as a region of interest <NUM>.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify the length from the identified middle position to the right edge of the bounding box <NUM>. The identified middle position may refer to the central x-axis of the sliding window <NUM> corresponding to the point where the sum is minimum. The identified length may correspond to the length of the right half of the rear surface of the target vehicle.

In operation <NUM>, the electronic device <NUM> may set an area having twice the width of the identified length and the same height as the height of the bounding box <NUM> as the region of interest <NUM>. Referring to <FIG>, since the length identified in operation <NUM> corresponds to the right half of the rear surface of the target vehicle, the processor <NUM> may set an area having a width twice the identified length and a height h equal to that of the bounding box <NUM> as a region of interest <NUM>.

<FIG> is a flowchart illustrating an operating method for performing validity determination of a detection result according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify a target vehicle type based on the vehicle detection model. For example, the vehicle detection model may classify the vehicle type of vehicles in front by detecting objects included in the front image. For example, the vehicle detection model may identify the vehicle type of vehicles in front as any one of a sedan, a SUV (sport utility vehicle), a RV (recreational vehicle), a hatchback, a truck, a bus, and a special vehicle.

In operation <NUM>, the electronic device <NUM> may identify a full width value corresponding to the identified vehicle type. For example, the processor <NUM> may store the average full width value for each vehicle type that the vehicle detection model may classify in advance in the memory <NUM>. The average full width value for each vehicle type may be stored in the form of a look-up table. For example, in case that the vehicle type is the sedan, the average full width may be <NUM>. For example, in case that the vehicle type is the bus, the average full width may be <NUM>. The processor <NUM> may identify the full width value corresponding to the vehicle type of the target vehicle classified according to the vehicle detection model by referring to the look-up table.

In operation <NUM>, the electronic device <NUM> may calculate the full width of the target vehicle based on the width of the area of interest. The processor <NUM> may calculate the full width of the actual target vehicle by using the width of the region of interest <NUM> through the process of converting the pixel coordinate system of the front image obtained through the camera <NUM> into the world coordinate system.

In operation <NUM>, the electronic device <NUM> may determine whether a difference between the identified full width value and the calculated full width value exceeds a predetermined value. For example, the processor <NUM> may identify the vehicle type of the target vehicle as the bus based on the vehicle detection model, and may search the memory <NUM> to identify that the full width corresponding to the vehicle type of the bus is <NUM>. In addition, the processor <NUM> may calculate the full width of the target vehicle corresponding to the bus through an operation of converting the region of interest <NUM> in the front image into the world coordinate system. For example, the full width of the target vehicle calculated by the processor <NUM> may be <NUM>. In this case, a difference between the calculated full width value for the target vehicle and the full width value identified according to the vehicle type may be <NUM>. For example, the predetermined value may be <NUM>. The processor <NUM> may allow an error of <NUM> or less, considering that it is the front image obtained while driving and an average full width value of a plurality of vehicles included in the same vehicle type. The predetermined value may be variably set according to a manufacturer of the processor <NUM> or the host vehicle <NUM>.

In operation <NUM>, the electronic device <NUM> may identify the detection result of the region of interest <NUM> as valid. For example, the target vehicle detected based on the vehicle detection model is the sedan, and the average full width of the sedan may be <NUM>. In addition, the processor <NUM> may identify that the full width of the target vehicle is <NUM> by calculating the width of the actual rear surface of the target vehicle by using the width corresponding to the region of interest <NUM> of the target vehicle. Since the difference value between the identified full width value and the calculated full width value is only <NUM>, the processor <NUM> may identify that the region of interest <NUM> is appropriately set, and the detection result of the region of interest <NUM> is valid.

In operation <NUM>, the electronic device <NUM> may identify that an error has occurred in the detection result of the region of interest <NUM>. For example, the target vehicle detected based on the vehicle detection model is the sedan, and the average full width of the sedan may be <NUM>. In addition, for example, the processor <NUM> may identify the full width of the target vehicle by calculating the width of the actual rear surface of the target vehicle by using the width corresponding to the region of interest <NUM> of the target vehicle. In other words, while the detected vehicle type is the sedan, the full width of the target vehicle based on the width of the region of interest <NUM> may be the same length as the bus. The processor <NUM> may identify that a difference value between the identified full width value and the calculated full width value is <NUM>. Since the difference value exceeds a predetermined value, the processor <NUM> may identify that an error has occurred in the process of detecting the region of interest <NUM>.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify the first direction of the x-component of the center point coordinate of the bounding box <NUM> in the front image. The first direction may be the same as a direction of a lane in which the target vehicle is driving. For example, the target vehicle may be a vehicle driving in front of the left lane of the host vehicle <NUM>.

In operation <NUM>, the electronic device <NUM> may identify the second direction of the position where the sum of the difference values of pixels among the bounding boxes <NUM> is minimum. The second direction may refer to a direction corresponding to a position where the sum of difference values of the pixels is minimum based on the central x-axis of the bounding box <NUM>. For example, referring to <FIG> together, since the center x-axis <NUM> of the sliding window <NUM>, where the sum of difference values of pixels is the minimum, is positioned on the left side from the center x-axis of the bounding box <NUM>, the second direction may correspond to the left side.

In operation <NUM>, the electronic device <NUM> may determine whether the first direction and the second direction coincide with each other. For example, in case that the target vehicle is driving in the left lane of the host vehicle <NUM>, the first direction may correspond to the left. In addition, in case that the target vehicle is driving in the left lane of the host vehicle <NUM>, since the central x-axis <NUM> of the sliding window <NUM> where the sum of difference values of pixels is the minimum with respect to the center x-axis of the bounding box <NUM> including the target vehicle is positioned on the left side, the second direction may also correspond to the left. According to an embodiment, in case that the first direction is left while the second direction is identified as the right, since the center of the rear surface of the target vehicle driving in the left lane is identified from the right side, it is possible to identify that an error has occurred in the detection result of the region of interest <NUM> according to operation <NUM>.

In operation <NUM>, the electronic device <NUM> may determine whether a position where the sum of the difference values is minimum is included within a predetermined area. The predetermined area may be an area including the size of the first area <NUM> or the second area <NUM> along the first direction from the center x-axis of the bounding box <NUM>. In case that the position where the sum of the difference values is minimum is included within the predetermined area, in operation <NUM>, the processor <NUM> may identify the detection result of the region of interest <NUM> as valid. On the other hand, in case that the position where the sum of the difference values is minimum is out of the predetermined area, in operation <NUM>, the processor <NUM> may identify that an error has occurred in the detection result of the region of interest <NUM> and may perform a symmetric comparison process again with respect to the predetermined area. In other words, the processor <NUM> may set the predetermined area as a new bounding box and may generate a new sliding window according to the size of the newly set bounding box to shift the sliding window.

<FIG> is a flowchart illustrating an operating method for identification of a cut-in event according to various embodiments.

<FIG> illustrates an example of a cut-in event according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may calculate a difference value between an x-coordinate value of a position where the sum of the difference values of pixels in the sliding window <NUM> is the minimum and a center x-coordinate value of the front image. For example, the x-coordinate value at a position where the sum of the difference values of pixels in the sliding window <NUM> is minimum may correspond to the center of the rear surface of the target vehicle. The processor <NUM> may calculate how far the center of the rear surface of the target vehicle is from the center of the front image by x-coordinates.

In operation <NUM>, the electronic device <NUM> may determine whether the amount of change in the difference value per unit time exceeds the threshold value. The processor <NUM> may determine how quickly the difference value changes. For example, referring to <FIG> together, in case that the target vehicle driving in the left lane of the host vehicle <NUM> rapidly cuts into the same lane of the host vehicle <NUM>, the amount of change in the difference value per unit time may be large. For another example, in case that the target vehicle driving in the left lane of the host vehicle <NUM> slowly cuts into the same lane of the host vehicle <NUM>, the amount of change in the difference value per unit time may be relatively small. The processor <NUM> may identify that a cut-in event occurs in case that it is identified that a change in the difference value per unit time exceeds a threshold value because a target vehicle driving in a neighboring lane rapidly cuts in. The cut-in event may be an event in which a front vehicle driving in a neighboring lane of the host vehicle <NUM> enters a driving lane of the host vehicle <NUM>.

In operation <NUM>, the electronic device <NUM> may perform vehicle control for preventing a collision in response to identification of the occurrence of the cut-in event. For example, the processor <NUM> may perform control for reducing the velocity of the host vehicle <NUM> in response to identification of the cut-in event. To this end, the vehicle control unit <NUM> may generate a control signal instructing deceleration and transmit the control signal to the brake system. For another example, in response to the identification of the cut-in event, the processor <NUM> may perform control to avoid or prevent collision (collision avoidance/collision mitigation) between the host vehicle <NUM> and the target vehicle by considering the moving velocity of the target vehicle that triggered the cut-in event, the predicted driving direction of the target vehicle, the driving velocity of the host vehicle <NUM>, and driving direction of the host vehicle <NUM>. To this end, the vehicle control unit <NUM> may generate a control signal for controlling the driving velocity of the host vehicle and may transfer the control signal to a brake system or an acceleration system. In addition to this, the vehicle control unit <NUM> may transmit a control signal to a steering system of the host vehicle in case that it is necessary to change the driving direction of the host vehicle <NUM>.

In an embodiment, the acceleration system includes means for supplying driving power of the host vehicle <NUM> such as an electric motor and an internal combustion engine.

<FIG> is a flowchart illustrating an operating method for adjusting a height of a sliding window <NUM> according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may identify the vehicle type of the target vehicle based on the vehicle detection model and may identify the full height value of the identified vehicle type. For example, the vehicle detection model may classify the vehicle types of vehicles in front by detecting objects included in the front image. For example, the vehicle detection model may identify the vehicle type of the vehicles in front as any one of a sedan, an SUV, an RV, a hatchback, a truck, a bus, and a special vehicle. The processor <NUM> may identify the full height value corresponding to the identified vehicle type. For example, the processor <NUM> may store in advance the average full height value for each vehicle type that the vehicle detection model may classify in the memory <NUM>. The average full width value for each vehicle type may be stored in the form of a look-up table. For example, in case that the vehicle type is the sedan, the average full height may be <NUM>. For example, in case that the vehicle type is the SUV, the average full height may be <NUM>. For example, in case that the vehicle type is the bus, the average full width may be <NUM>. The processor <NUM> may identify an full height value corresponding to the vehicle type of the target vehicle classified according to the vehicle detection model by referring to the look-up table.

In operation <NUM>, the electronic device <NUM> may determine whether a difference between the full height value according to the identified vehicle type and the full height value calculated according to the height of the bounding box exceeds the predetermined value. For example, the processor <NUM> may identify the type of the target vehicle as the sedan based on the vehicle detection model, and may search the memory <NUM> to identify that the full height value corresponding to the sedan vehicle type is <NUM>. The processor <NUM> may calculate the full height of the target vehicle based on the height of the region of interest <NUM>. The processor <NUM> may calculate the full height of the actual target vehicle by using the height of the region of interest <NUM> through a process of converting the pixel coordinate system of the front image obtained through the camera <NUM> into the world coordinate system. For example, the full height of the target vehicle calculated by the processor <NUM> may be <NUM>. In this case, the difference between the calculated full height value for the target vehicle and the full height value identified according to the vehicle type may be <NUM>. In case that the difference between the identified full height values does not exceed a predetermined value, the processor <NUM> may determine that there is no load on top of the target vehicle and may terminate the procedure. For example, the predetermined value may be <NUM>. The processor <NUM> may allow an error of <NUM> or less in consideration of a point that is the front image obtained while driving, the average full height value of a plurality of vehicles included in the same vehicle type, and the like. The predetermined value may be variably set depending on the manufacturer of the processor <NUM> or the host vehicle <NUM>.

In case that the difference between the identified full height values exceeds the predetermined value, the processor <NUM> may determine that a load exists on top of the target vehicle and a bounding box <NUM> including the load is generated.

In operation <NUM>, the electronic device <NUM> may adjust the height of the sliding window <NUM> to be smaller than the height of the bounding box <NUM>. The processor <NUM> may identify that difference between the identified full height values exceeds a predetermined value and determine that the target vehicle has a load (e.g., cargo, roof back, and roof rack) on the top. Accordingly, the processor <NUM> may perform a symmetrical comparison process by setting the height of the sliding window <NUM> to be less than the height of the bounding box <NUM> and shifting the sliding window <NUM> left and right in contact with the lower edge of the bounding box <NUM>. According to an embodiment, the processor <NUM> may variably reduce the height of the sliding window <NUM> as the difference between the identified full height values increases.

<FIG> is a flowchart illustrating an operating method for variably setting a pixel interval for shifting a sliding window <NUM> according to various embodiments.

Referring to <FIG>, in operation <NUM>, the electronic device <NUM> may measure the velocity of the host vehicle <NUM> through the sensing circuit <NUM>. For example, the processor <NUM> may activate an acceleration sensor (not illustrated) of the sensing circuit <NUM>. The acceleration sensor (not illustrated) may measure the driving velocity of the host vehicle <NUM> including the electronic device <NUM>.

In operation <NUM>, the electronic device <NUM> may determine whether the measured velocity exceeds the threshold velocity. The threshold velocity may be the reference velocity of judgment to increase the velocity of the symmetric comparison process for rear surface detection of the target vehicle because the velocity of the host vehicle <NUM> is fast. For example, the faster the velocity of the host vehicle <NUM>, the faster the rear surface detection of the target vehicle should be performed, but in case that the sliding window <NUM> is shifted pixel by pixel, the velocity of the rear surface detection of the target vehicle may be slowed.

In operation <NUM>, the electronic device <NUM> may increase a pixel interval shifted by the sliding window <NUM>. For example, the threshold velocity may be <NUM>/h. In other words, in case that the host vehicle <NUM> drives at a velocity of <NUM> per hour, the processing velocity for rear surface detection of the target vehicle may need to be increased. The processor <NUM> may increase a predefined pixel interval for shifting the sliding window <NUM> in response to the measured velocity of the host vehicle <NUM> exceeding the threshold velocity. In operation <NUM>, the electronic device <NUM> may maintain a pixel interval shifted by the sliding window <NUM>. For example, in case that the velocity of the host vehicle <NUM> is less than the threshold velocity, the sliding window <NUM> may be shifted for each pixel. In case that the velocity of the host vehicle <NUM> exceeds the threshold velocity, the processor <NUM> may increase the pixel interval at which the sliding window <NUM> is shifted to two or three.

At as mentioned above, according to an embodiment, an electronic device provided in an autonomous vehicle, the electronic device comprising, a camera, a memory storing at least one instruction, and at least one processor operatively coupled with the camera, wherein the at least one processor is configured to, when the instructions are executed obtain a front image in which the autonomous vehicle is driving through the camera, identify a target vehicle in the front image based on the vehicle detection model stored in the memory, generate a bounding box corresponding to the target vehicle in response to an identification of the target vehicle, generate a sliding window having a height equal to the height of the bounding box and having a width half of the width of the bounding box, divide the bounding box into a first area positioned left based on a middle position of the bounding box, and a second area positioned right based on the middle position of the bounding box, generate an extended bounding box by extending the first area in a left direction and extending the second area in a right direction, wherein size of the extended bounding box is twice as wide as size of the bounding box, obtain a sum of a pixel difference values between the first area and the second area for each shift by sequentially shifting the sliding window by a predefined pixel interval with respect to all of width of the extended bounding box, and identify a point that corresponds to a minimum value among sum values respectively indicating the sums that are obtained according to the shifting.

According to various embodiments, the electronic device the at least one processor is configured to, when the instructions are executed change each of the pixels of the second area for inverting the second area left and right, obtain the sums of the pixel difference values by adding up difference values of each of the pixels of the inverted second area and each of the pixels of the first area.

According to various embodiments, the electronic device the at least one processor is configured to, when the instructions are executed identify a coordinate of a center point of the bounding box, obtain a first direction based on identifying whether the identified coordinate is included in a left area or a right area in the front image, wherein the sliding window is started the shifting from an edge corresponding to the first direction among four edges forming the bounding box.

According to various embodiments, the at least one processor is configured to, when the instructions are executed set an area of interest that has a width twice as wide as an area and a height equal to the height of the bounding box from the point where the sum value is minimum to the edge corresponding to the first direction, based on the point where the sum value is minimum.

According to various embodiments, the at least one processor is configured to, when the instructions are executed obtain the second direction based on identifying whether the point where the sum value is minimum is included in the left area or the right area within the bounding box, determine that the identification of the point where the sum value is minimum is not valid, when the first direction and the second direction do not match.

According to various embodiments, the at least one processor is configured to, when the instructions are executed identify whether the point where the sum value is minimum is included within a predetermined area in the first direction from a center x-axis of the front image, when the first direction and the second direction match, determine that the identification of the point where the sum value is minimum is not valid, when the point where the sum value is minimum is not included within the predetermined area.

According to various embodiments, the electronic device further comprises a sensor module for measuring a velocity of the autonomous vehicle, the at least one processor is configured to, when the instructions are executed measure the velocity of the autonomous vehicle through the sensor module, perform a comparison between the measured velocity and a threshold velocity.

According to various embodiments, the at least one processor is configured to, when the instructions are executed increase the predefined pixel interval when the measured velocity exceeds the threshold velocity.

According to various embodiments, the at least one processor is configured to, when the instructions are executed calculate a difference value between a x-coordinate value of the point where the sum value is minimum and a center x-coordinate value of the front image, identify an occurrence of a cut-in event, in response to identifying that an amount of change in the difference value per unit time exceeds a negative threshold value, perform vehicle control for preventing collision of the autonomous vehicle in response to identifying the occurrence of the cut-in event.

According to various embodiments, the at least one processor is configured to, when the instructions are executed identify a vehicle type of the target vehicle, based on the vehicle detection model, identify a full width value corresponding to the identified vehicle type, calculate a full width value of the target vehicle, based on the width of area of the interest, decide whether a difference of the full width value corresponding to the identified vehicle type and the calculated the full width value of the target vehicle, exceeds a predetermined value, identify that a detection result of the area of interest is not valid when the difference of the full width value corresponding to the identified vehicle type and the calculated the full width value of the target vehicle, exceeds a predetermined value.

At as mentioned above, according to an embodiment, method of operating an electronic device provide in an autonomous vehicle, obtaining a front image in which the autonomous vehicle is driving through a camera, identifying a target vehicle in the front image based on the vehicle detection model stored in a memory, generating a bounding box corresponding to the target vehicle in response to an identification of the target vehicle, generating a sliding window having a height equal to the height of the bounding box and having a width half of the width of the bounding box, dividing the bounding box into a first area positioned left based on a middle position of the bounding area and a second area positioned right based on the middle position of the bounding area, generating an extended bounding box by extending the first area in a left direction and extending the second area in a right direction wherein size of the extended bounding box is twice as wide as size of the bounding box, obtaining a sum of a pixel difference values between the first area and the second area for each shift by sequentially shifting the sliding window by a predefined pixel interval with respect to all of width of the extended bounding box, and identifying a point that corresponds to a minimum value among sum values respectively indicating the sums that are obtained according to the shifting.

According to various embodiments, the operation of obtaining the sum of the pixel difference values between the first area and the second area further comprises changing each of the pixels of the second area so that the second area is left and right inverted, obtaining the sums of the pixel difference values by adding up difference values of each of the pixels of the inverted second area and each of the pixels of the first area.

According to various embodiments, the method further comprises identifying a coordinate of a center point of the bounding box, obtaining a first direction based on identifying whether the identified coordinate is included in a left area or a right area in the front image, wherein the sliding window is started the shifting from an edge corresponding to the first direction among four edges forming the bounding box.

According to various embodiments, the method further comprises setting an area of interest that has a width twice as wide as an area and a height equal to the height of the bounding box from the point where the sum value is minimum to the edge corresponding to the first direction, based on the point where the sum value is minimum.

According to various embodiments, the method further comprises obtaining the second direction based on identifying whether the point where the sum value is minimum is included in the left area or the right area within the bounding box, determining that the identification of the point where the sum value is minimum is not valid, when the first direction and the second direction do not match.

According to various embodiments, the method further comprises identifying whether the point where the sum value is minimum is included within a predetermined area in the first direction from a center x-axis of the front image, when the first direction and the second direction match, determining that the identification of the point where the sum value is minimum is not valid, when the point where the sum value is minimum is not included within the predetermined area.

According to various embodiments, the method further comprises measuring the velocity of the autonomous vehicle through the sensor module, performing a comparison between the measured velocity and a threshold velocity.

According to various embodiments, the method further comprises increasing the predefined pixel interval when the measured velocity exceeds the threshold velocity.

According to various embodiments, the method further comprises calculating a difference value between a x-coordinate value of the point where the sum value is minimum and a center x-coordinate value of the front image, identifying an occurrence of a cut-in event, in response to identifying that an amount of change in the difference value per unit time exceeds a negative threshold value, performing vehicle control for preventing collision of the autonomous vehicle in response to identifying the occurrence of the cut-in event.

According to various embodiments, the method further comprises identifying a vehicle type of the target vehicle, based on the vehicle detection model, identifying a full width value corresponding to the identified vehicle type, calculating a full width value of the target vehicle, based on the width of area of the interest, deciding whether a difference of the full width value corresponding to the identified vehicle type and the calculated the full width value of the target vehicle, exceeds a predetermined value, identifying that a detection result of the area of interest is not valid when the difference of the full width value corresponding to the identified vehicle type and the calculated the full width value of the target vehicle, exceeds a predetermined value.

The apparatus described above may be implemented as a combination of hardware components, software components, and/or hardware components and software components. For example, the devices and components described in the embodiments may be implemented using one or more general purpose computers or special purpose computers such as processors, controllers, arithmetical logic unit(ALU), digital signal processor, microcomputers, field programmable gate array (FPGA), PLU(programmable logic unit), microprocessor, any other device capable of executing and responding to instructions. The processing device may perform an operating system OS and one or more software applications performed on the operating system. In addition, the processing device may access, store, manipulate, process, and generate data in response to execution of the software. For convenience of understanding, although one processing device may be described as being used, a person skilled in the art may see that the processing device may include a plurality of processing elements and/or a plurality of types of processing elements. For example, the processing device may include a plurality of processors or one processor and one controller. In addition, other processing configurations, such as a parallel processor, are also possible.

The software may include a computer program, code, instruction, or a combination of one or more of them and configure the processing device to operate as desired or command the processing device independently or in combination. Software and/or data may be embodied in any type of machine, component, physical device, computer storage medium, or device to be interpreted by a processing device or to provide instructions or data to the processing device. The software may be distributed on a networked computer system and stored or executed in a distributed manner. Software and data may be stored in one or more computer-readable recording media.

The method according to the embodiment may be implemented in the form of program instructions that may be performed through various computer means and recorded in a computer-readable medium. In this case, the medium may continuously store a computer-executable program or temporarily store the program for execution or download. In addition, the medium may be a variety of recording means or storage means in which a single or several hardware are combined and is not limited to media directly connected to any computer system and may be distributed on the network. Examples of media may include magnetic media such as hard disks, floppy disks and magnetic tapes, optical recording media such as CD-ROMs and DVDs, magnetooptical media such as floppy disks, ROMs, RAMs, flash memories, and the like to store program instructions. Examples of other media include app stores that distribute applications, sites that supply or distribute various software, and recording media or storage media managed by servers.

Claim 1:
An electronic device (<NUM>, <NUM>, <NUM>) provided in an autonomous vehicle (<NUM>), the electronic device (<NUM>, <NUM>, <NUM>) comprising:
a) a camera (<NUM>);
b) a memory (<NUM>) storing at least one instruction; and
c) at least one processor (<NUM>) operatively coupled with the camera (<NUM>);
d) wherein the at least one processor (<NUM>) is configured to, when the instructions are executed:
e) obtain (<NUM>) a front image in which the autonomous vehicle (<NUM>) is driving through the camera (<NUM>),
f) identify (<NUM>) a target vehicle (<NUM>) in the front image based on the vehicle detection model (<NUM>) stored in the memory (<NUM>),
g) generate (<NUM>) a bounding box (<NUM>, <NUM>, <NUM>) corresponding to the target vehicle (<NUM>) in response to an identification of the target vehicle (<NUM>),
h) generate (<NUM>) a sliding window (<NUM>) having a height equal to the height of the bounding box (<NUM>, <NUM>, <NUM>) and having a width half of the width of the bounding box (<NUM>, <NUM>, <NUM>),
i) divide (<NUM>) the bounding box (<NUM>, <NUM>, <NUM>) into a first area (<NUM>) positioned left based on a middle position of the bounding box (<NUM>, <NUM>, <NUM>), and a second area (<NUM>) positioned right based on the middle position of the bounding box (<NUM>, <NUM>, <NUM>),
j) generate (<NUM>) an extended bounding box (<NUM>) by extending the first area (<NUM>) in a left direction and extending the second area (<NUM>) in a right direction, wherein size of the extended bounding box (<NUM>) is twice as wide as size of the bounding box (<NUM>, <NUM>, <NUM>), wherein pixel values in extended portions (<NUM>, <NUM>) of the extended bounding box (<NUM>) are corresponding to an average value of all pixel values included in the bounding box (<NUM>, <NUM>, <NUM>),
k) obtain (<NUM>) a sum of a pixel difference values between a left portion of the sliding window (<NUM>) and a right portion of the sliding window (<NUM>) for each shift by sequentially shifting the sliding window (<NUM>) by a predefined pixel interval with respect to all of width of the extended bounding box (<NUM>), wherein the right portion of the sliding window (<NUM>) is inverted left and right while obtaining (<NUM>) the sum of the pixel difference values for each of sequentially shifted sliding windows (<NUM>), and
l) identify (<NUM>) a point that corresponds to a minimum value among sum values respectively indicating the sums that are obtained according to the shifting.