IP Library Granted Patent US 11,593,908
Granted Patent B2
US 11,593,908 · App. 17/205,863 · Granted Feb 28, 2023

Method for preprocessing image in augmented reality and related electronic device

Inventor: Cancan Peng (Beijing, CN)
Assignee: APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECHNOLOGY CO., LTD.
G06T1/20G06T1/60G06T11/001G06T15/005
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,593,908
App. No.
17/205,863
Granted
Feb 28, 2023
Kind
B2
Abstract

The disclosure discloses a method for preprocessing an image and a related electronic device. A current data frame captured through a camera is obtained by a pre-created drawing surface window called by a central processing unit (CPU) in response to a preview activating instruction of the camera. The current data frame is converted into a preview texture corresponding to the current data frame by the pre-created drawing surface window. The preview texture corresponding to the current data frame is sent to a graphics processing unit (GPU). The preview texture corresponding to the current data frame is processed by the GPU. The preview texture processed is sent by the CPU to an advanced driving assistance system (ADAS).

Claims (62)

1. A method for preprocessing an image, comprising:

obtaining a current data frame captured through a camera by a pre-created drawing surface window, wherein the pre-created drawing surface window is called by a central processing unit (CPU) in response to a preview activating instruction of the camera;

converting the current data frame into a preview texture corresponding to the current data frame by the pre-created drawing surface window; and

sending the preview texture corresponding to the current data frame to a graphics processing unit (GPU), processing, by the GPU, the preview texture corresponding to the current data frame, and sending, by the CPU, the preview texture processed to an advanced driving assistance system (ADAS);

wherein processing the preview texture by the GPU comprises:

converting a color of the preview texture corresponding to the current data frame within a storage space occupied by the GPU by calling a preset shader by the GPU;

converting a pixel format of the preview texture corresponding to the current data frame within the storage space occupied by the GPU; or

scaling a size of the preview texture corresponding to the current data frame within the storage space occupied by the GPU.

2. The method of claim 1 , wherein converting the current data frame into the preview texture comprises:

associating the pre-created drawing surface window with a predetermined type of texture; and

converting the current data frame into the preview texture corresponding to the current data frame by the pre-created drawing surface window associated with the predetermined type of texture.

3. The method of claim 1 , wherein sending the preview texture processed to the advanced driving assistance system ADAS by the CPU comprises:

copying the preview texture processed from the GPU to the CPU by a preset graphics buffer, and sending the preview texture processed to the ADAS by the CPU.

4. The method of claim 1 , further comprising:

drawing the preview texture corresponding to the current data frame on a target screen by a pre-created component associated with the target screen.

5. The method of claim 4 , wherein drawing the preview texture corresponding to the current data frame on the target screen by the pre-created component associated with the target screen comprises:

setting a drawing surface window in the pre-created component associated with the target screen as the pre-created drawing surface window; and

drawing the preview texture corresponding to the current data frame on the target screen by setting the drawing surface window as the component of the pre-created drawing surface window.

6. The method of claim 1 , further comprising:

creating a graphics library thread by calling a thread creation function, and configuring a window management environment of an open graphics library of the graphics library thread by calling a start function through the graphics library thread; and

creating a drawing surface window for camera preview as the pre-created drawing surface window in the graphics library thread for configuring the window management environment of the open graphics library.

7. An electronic device, comprising:

at least one processor; and

a memory, communicatively coupled to the at least one processor,

wherein the memory is configured to store instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is configured to:

obtain a current data frame captured through a camera by a pre-created drawing surface window, wherein the pre-created drawing surface window is called by a central processing unit (CPU) in response to a preview activating instruction of the camera;

convert the current data frame into a preview texture corresponding to the current data frame by the pre-created drawing surface window; and

send the preview texture corresponding to the current data frame to a graphics processing unit (GPU);

wherein the GPU is configured to process the preview texture corresponding to the current data frame; and

the CPU is configured to send the preview texture processed to an advanced driving assistance system (ADAS); the GPU is further configured to: convert a color of the preview texture corresponding to the current data frame within a storage space occupied by the GPU by calling a preset shader by the GPU; convert a pixel format of the preview texture corresponding to the current data frame within the storage space occupied by the GPU;

or scale a size of the preview texture corresponding to the current data frame within the storage space occupied by the GPU.

8. The electronic device of claim 7 , wherein the at least one processor is further configured to:

associate the pre-created drawing surface window with a predetermined type of texture; and

convert the current data frame into the preview texture corresponding to the current data frame by the pre-created drawing surface window associated with the predetermined type of texture.

9. The electronic device of claim 7 , wherein the at least one processor is further configured to:

copy the preview texture processed from the GPU to the CPU by a preset graphics buffer, and send the preview texture processed to the ADAS by the CPU.

10. The electronic device of claim 7 , wherein the at least one processor is further configured to:

draw the preview texture corresponding to the current data frame on a target screen by a pre-created component associated with the target screen.

11. The electronic device of claim 10 , wherein the at least one processor is further configured to:

set a drawing surface window in the pre-created component associated with the target screen as the pre-created drawing surface window; and

draw the preview texture corresponding to the current data frame on the target screen by setting the drawing surface window as the component of the pre-created drawing surface window.

12. The electronic device of claim 7 , wherein the at least one processor is further configured to:

create a graphics library thread by calling a thread creation function, and configure a window management environment of an open graphics library of the graphics library thread by calling a start function through the graphics library thread; and

create a drawing surface window for camera preview as the pre-created drawing surface window in the graphics library thread for configuring the window management environment of the open graphics library.

13. A non-transitory computer readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to execute the method for preprocessing the image, the method comprising:

obtaining a current data frame captured through a camera by a pre-created drawing surface window, wherein the pre-created drawing surface window is called by a central processing unit (CPU) in response to a preview activating instruction of the camera;

converting the current data frame into a preview texture corresponding to the current data frame by the pre-created drawing surface window; and

sending the preview texture corresponding to the current data frame to a graphics processing unit (GPU), processing, by the GPU, the preview texture corresponding to the current data frame, and sending, by the CPU, the preview texture processed to an advanced driving assistance system (ADAS);

wherein processing the preview texture by the GPU comprises:

converting a color of the preview texture corresponding to the current data frame within a storage space occupied by the GPU by calling a preset shader by the GPU;

converting a pixel format of the preview texture corresponding to the current data frame within the storage space occupied by the GPU; or

scaling a size of the preview texture corresponding to the current data frame within the storage space occupied by the GPU.

14. The non-transitory computer readable storage medium of claim 13 , wherein converting the current data frame into the preview texture comprises:

associating the pre-created drawing surface window with a predetermined type of texture; and

converting the current data frame into the preview texture corresponding to the current data frame by the pre-created drawing surface window associated with the predetermined type of texture.

15. The non-transitory computer readable storage medium of claim 13 , wherein sending the preview texture processed to the advanced driving assistance system ADAS by the CPU comprises:

copying the preview texture processed from the GPU to the CPU by a preset graphics buffer, and sending the preview texture processed to the ADAS by the CPU.

16. The non-transitory computer readable storage medium of claim 13 , wherein the method further comprises:

drawing the preview texture corresponding to the current data frame on a target screen by a pre-created component associated with the target screen.

17. The non-transitory computer readable storage medium of claim 16 , wherein drawing the preview texture corresponding to the current data frame on the target screen by the pre-created component associated with the target screen comprises:

setting a drawing surface window in the pre-created component associated with the target screen as the pre-created drawing surface window; and

drawing the preview texture corresponding to the current data frame on the target screen by setting the drawing surface window as the component of the pre-created drawing surface window.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 13, 2021
From: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
To: APOLLO INTELLIGENT CONNECTIVITY (BEIJING) TECHNOLOGY CO., LTD.
Reel/Frame 057789/0357 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 18, 2021
From: PENG, CANCAN
To: BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD.
Reel/Frame 055642/0449 →
Priority Claims (1)
CN 202010476471.5 · May 29, 2020 · national
Continuity (1)
Related Publication 20210209721A1 · Jul 8, 2021
Cited By (1)
US 12,688,665