[go: up one dir, main page]

CN117008861A - A display method and related device - Google Patents

A display method and related device Download PDF

Info

Publication number
CN117008861A
CN117008861A CN202311051629.4A CN202311051629A CN117008861A CN 117008861 A CN117008861 A CN 117008861A CN 202311051629 A CN202311051629 A CN 202311051629A CN 117008861 A CN117008861 A CN 117008861A
Authority
CN
China
Prior art keywords
lcd
screen
image
alternatively
clockwise
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311051629.4A
Other languages
Chinese (zh)
Inventor
郭俊煌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Guanghetong Wireless Communication Software Co ltd
Original Assignee
Shenzhen Guanghetong Wireless Communication Software Co ltd
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 Shenzhen Guanghetong Wireless Communication Software Co ltd filed Critical Shenzhen Guanghetong Wireless Communication Software Co ltd
Priority to CN202311051629.4A priority Critical patent/CN117008861A/en
Publication of CN117008861A publication Critical patent/CN117008861A/en
Priority to PCT/CN2024/093794 priority patent/WO2025039633A1/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1415Digital output to display device ; Cooperation and interconnection of the display device with other functional units with means for detecting differences between the image stored in the host and the images displayed on the displays

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Editing Of Facsimile Originals (AREA)

Abstract

本申请公开了一种显示方法及相关装置,应用于图像显示技术领域。该方法应用显示系统,该显示系统包括依次通信连接的主机、显示驱动芯片及屏幕,该显示方法包括:在屏幕的方向发生第一变化时,主机获取与第一变化对应的第一转换函数,并将原始图像按照第一转换函数进行转换,得到目标图像;主机将目标图像写入显示驱动芯片的图像显示存储器;显示驱动芯片读取图像显示存储器的目标图像,并将其通过屏幕进行显示。本方法可以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。

This application discloses a display method and related devices, which are applied in the technical field of image display. The method applies a display system, which includes a host, a display driver chip, and a screen that are communicated with each other in sequence. The display method includes: when a first change occurs in the direction of the screen, the host obtains a first conversion function corresponding to the first change, The original image is converted according to the first conversion function to obtain the target image; the host writes the target image into the image display memory of the display driver chip; the display driver chip reads the target image from the image display memory and displays it on the screen. This method can solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

Description

一种显示方法及相关装置A display method and related device

技术领域Technical Field

本申请涉及图像显示技术领域,尤其涉及一种显示方法及相关装置。The present application relates to the field of image display technology, and in particular to a display method and related devices.

背景技术Background Art

在手持终端设备等领域中,薄膜晶体管-液晶显示器(thin film transistor-liquid crystal display,TFT-LCD)常常被用作图像显示,并且经常对其进行旋转后显示图像。目前常见的TFT-LCD驱动芯片几乎都自带有硬件旋转功能,可通过配置其他内部寄存器来让屏幕旋转显示。In the field of handheld terminal equipment, thin film transistor-liquid crystal display (TFT-LCD) is often used for image display, and the image is often displayed after being rotated. Currently, most common TFT-LCD driver chips have a hardware rotation function, which can rotate the screen by configuring other internal registers.

但是,当屏幕旋转后,由于图像的像素数据在写入图像显示存储器(graphicrandom access memory,G-RAM)与读出的方向不一致,导致屏幕在刷新画面时存在画面割裂的现象。However, when the screen is rotated, the pixel data of the image is written into and read from the graphic random access memory (G-RAM) in inconsistent directions, resulting in a phenomenon of image fragmentation when the screen is refreshed.

因此,如何解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题成为了重点研究课题。Therefore, how to solve the problem of screen fragmentation when refreshing the screen due to screen rotation has become a key research topic.

发明内容Summary of the invention

本申请实施例提供了一种显示方法及相关装置,可以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。The embodiments of the present application provide a display method and related devices, which can solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

第一方面,本申请实施例提供了一种显示方法,该方法应用于显示系统,该显示系统包括依次通信连接的主机、显示驱动芯片及屏幕,该显示方法包括:In a first aspect, an embodiment of the present application provides a display method, which is applied to a display system, wherein the display system includes a host, a display driver chip, and a screen that are sequentially connected in communication, and the display method includes:

在所述屏幕的方向发生第一变化时,所述主机获取与所述第一变化对应的第一转换函数,并将原始图像按照所述第一转换函数进行转换,得到目标图像;When a first change occurs in the direction of the screen, the host obtains a first conversion function corresponding to the first change, and converts the original image according to the first conversion function to obtain a target image;

所述主机将所述目标图像写入所述显示驱动芯片的图像显示存储器;The host writes the target image into the image display memory of the display driver chip;

所述显示驱动芯片读取所述图像显示存储器的目标图像,并将其通过所述屏幕进行显示。The display driver chip reads the target image from the image display memory and displays it through the screen.

本申请实施例中,提供了一种显示方法,在显示系统中的屏幕的方向发生第一变化的情况下,主机获取与该第一变化对应的第一转换函数,并将原始图像按照第一转换函数进行转换,得到目标图像,再将目标图像写入显示系统中的显示驱动芯片的图像显示存储器,显示驱动芯片读取图像显示存储器的目标图像,并将其通过显示系统中的屏幕进行显示。In an embodiment of the present application, a display method is provided. When a first change occurs in the direction of a screen in a display system, a host obtains a first conversion function corresponding to the first change, and converts an original image according to the first conversion function to obtain a target image. The target image is then written into an image display memory of a display driver chip in the display system. The display driver chip reads the target image from the image display memory and displays it through the screen in the display system.

本申请实施例中,由于原始图像的方向变化与屏幕的方向变化相同,目标图像写入显示驱动芯片的图像显示存储器的方向与读取图像显示存储器的目标图像的方向也相同,因此,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,可以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In the embodiment of the present application, since the direction change of the original image is the same as the direction change of the screen, the direction in which the target image is written to the image display memory of the display driver chip is also the same as the direction in which the target image is read from the image display memory. Therefore, even if the direction of the screen changes, there will no longer be a phenomenon of screen fragmentation when the screen is refreshed, which can solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

在一种可能的实施方式中,若所述原始图像为坐标点,所述第一变化为顺时针旋转90°,所述第一转换函数对应为x1=y2,y1=lcd_h-1-x2In a possible implementation manner, if the original image is a coordinate point, the first change is a 90° clockwise rotation, and the first conversion function corresponds to x 1 =y 2 , y 1 =lcd_h-1-x 2 ;

或者,所述第一变化为顺时针旋转180°,所述第一转换函数对应为x1=lcd_w-1-x2,y1=lcd_h-1-y2Alternatively, the first change is a clockwise rotation of 180°, and the first conversion function corresponds to x 1 = lcd_w-1-x 2 , y 1 = lcd_h-1-y 2 ;

或者,所述第一变化为顺时针旋转270°,所述第一转换函数对应于:x1=lcd_w-1-y2,y1=x2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = x 2 ;

或者,所述第一变化为镜像,所述第一转换函数对应于:x1=x2,y1=lcd_h-1-y2Alternatively, the first change is a mirror image, and the first conversion function corresponds to: x 1 =x 2 , y 1 =lcd_h-1-y 2 ;

或者,所述第一变化为镜像且顺时针旋转90°,所述第一转换函数对应于:x1=y2,y1=x2Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 ;

或者,所述第一变化为镜像且顺时针旋转180°,所述第一转换函数对应于:x1=lcd_w-1-x2,y1=y2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = y 2 ;

或者,所述第一变化为镜像且顺时针旋转270°,所述第一转换函数对应于:x1=lcd_w-1-y2,y1=lcd_h-1-x2Alternatively, the first change is a mirror image and a 270° clockwise rotation, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = lcd_h-1-x 2 ;

其中,所述x1为所述原始图像中的第一坐标点的横坐标,所述y1为所述原始图像中的第一坐标点的纵坐标,所述x2为所述目标图像中的第二坐标点的横坐标,所述y2为所述目标图像中的第二坐标点的纵坐标,所述lcd_w为所述屏幕的分辨率的宽,所述lcd_h为所述屏幕的分辨率的高,所述第二坐标点为所述第一坐标点经过所述第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point in the original image, y1 is the vertical coordinate of the first coordinate point in the original image, x2 is the horizontal coordinate of the second coordinate point in the target image, y2 is the vertical coordinate of the second coordinate point in the target image, lcd_w is the width of the resolution of the screen, lcd_h is the height of the resolution of the screen, and the second coordinate point is the coordinate point corresponding to the first coordinate point after the first change.

在本申请实施方式中,提供了一种得到目标图像的可能的具体实施方式,具体为,若原始图像为坐标点,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中的坐标点(即第一坐标点)与目标图像中的坐标点(即第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, a possible specific implementation method for obtaining a target image is provided. Specifically, if the original image is a coordinate point, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between a coordinate point in the original image (i.e., the first coordinate point) and a coordinate point in the target image (i.e., the second coordinate point), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

应理解,本申请中提及的屏幕的分辨率的宽,指的是屏幕在横向(x轴)上的像素点数量,屏幕的分辨率的高,指的是屏幕在纵向(y轴)上的像素点数量,后文对此不再赘述。It should be understood that the width of the screen resolution mentioned in this application refers to the number of pixels on the horizontal (x-axis) side of the screen, and the height of the screen resolution refers to the number of pixels on the vertical (y-axis) side of the screen. This will not be discussed in detail later.

在一种可能的实施方式中,若所述原始图像为线段,所述第一变化为顺时针旋转90°,所述第一转换函数对应于:x1=y2,y1=lcd_h-1-x2In a possible implementation manner, if the original image is a line segment, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =lcd_h-1-x 2 ;

或者,所述第一变化为顺时针旋转180°,所述第一转换函数对应于:x1=lcd_w-1-x2,y1=lcd_h-1-y2Alternatively, the first change is a clockwise rotation of 180°, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = lcd_h-1-y 2 ;

或者,所述第一变化为顺时针旋转270°,所述第一转换函数对应于:x1=lcd_w-1-y2,y1=x2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = x 2 ;

或者,所述第一变化为镜像,所述第一转换函数对应于:x1=x2,y1=lcd_h-1-y2Alternatively, the first change is a mirror image, and the first conversion function corresponds to: x 1 =x 2 , y 1 =lcd_h-1-y 2 ;

或者,所述第一变化为镜像且顺时针旋转90°,所述第一转换函数对应于:x1=y2,y1=x2Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 ;

或者,所述第一变化为镜像且顺时针旋转180°,所述第一转换函数对应于:x1=lcd_w-1-x2,y1=y2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = y 2 ;

或者,所述第一变化为镜像且顺时针旋转270°,所述第一转换函数对应于:x1=lcd_w-1-y2,y1=lcd_h-1-x2Alternatively, the first change is a mirror image and a 270° clockwise rotation, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = lcd_h-1-x 2 ;

其中,所述x1为所述原始图像中的第一线段上的第一坐标点的横坐标,所述y1为所述原始图像中的第一线段上的第一坐标点的纵坐标,所述x2为所述目标图像中的第二线段上的第二坐标点的横坐标,所述y2为所述目标图像中的第二线段上的第二坐标点的纵坐标,所述lcd_w为所述屏幕的分辨率的宽,所述lcd_h为所述屏幕的分辨率的高,所述第二线段为所述第一线段经过所述第一变化后对应的线段,所述第二线段上的第二坐标点为所述第一线段上的第一坐标点经过所述第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point on the first line segment in the original image, y1 is the vertical coordinate of the first coordinate point on the first line segment in the original image, x2 is the horizontal coordinate of the second coordinate point on the second line segment in the target image, y2 is the vertical coordinate of the second coordinate point on the second line segment in the target image, lcd_w is the width of the resolution of the screen, lcd_h is the height of the resolution of the screen, the second line segment is the line segment corresponding to the first line segment after the first change, and the second coordinate point on the second line segment is the coordinate point corresponding to the first coordinate point on the first line segment after the first change.

在本申请实施方式中,提供了一种得到目标图像的可能的具体实施方式,具体为,若原始图像为线段,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中线段的坐标点(即第一线段上的第一坐标点)与目标图像中线段的坐标点(即第二线段上的第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, a possible specific implementation method for obtaining a target image is provided. Specifically, if the original image is a line segment, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between the coordinate point of the line segment in the original image (i.e., the first coordinate point on the first line segment) and the coordinate point of the line segment in the target image (i.e., the second coordinate point on the second line segment), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

在一种可能的实施方式中,若所述原始图像为矩形窗口,所述第一变化为顺时针旋转90°,所述第一转换函数对应于:x1=y2,y1=lcd_h-x2-w2,w1=h2,h1=w2In a possible implementation manner, if the original image is a rectangular window, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =lcd_h-x 2 -w 2 , w 1 =h 2 , h 1 =w 2 ;

或者,所述第一变化为顺时针旋转180°,所述第一转换函数对应于:x1=lcd_w-x2-w2,y1=lcd_h-y2-h2,w1=w2,h1=h2Alternatively, the first change is a clockwise rotation of 180°, and the first conversion function corresponds to: x 1 = lcd_w - x 2 - w 2 , y 1 = lcd_h - y 2 - h 2 , w 1 = w 2 , h 1 = h 2 ;

或者,所述第一变化为顺时针旋转270°,所述第一转换函数对应于:x1=lcd_w-y2-h2,y1=x2,w1=h2,h1=w2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w - y 2 - h 2 , y 1 = x 2 , w 1 = h 2 , h 1 = w 2 ;

或者,所述第一变化为镜像,所述第一转换函数对应于:x1=x2,y1=lcd_h-y2-h2,w1=w2,h1=h2Alternatively, the first change is a mirror image, and the first transfer function corresponds to: x 1 =x 2 , y 1 =lcd_h-y 2 -h 2 , w 1 =w 2 , h 1 =h 2 ;

或者,所述第一变化为镜像且顺时针旋转90°,所述第一转换函数对应于:x1=lcd_w-y2-h2,y1=lcd_h-x2-w2,w1=h2,h1=w2Alternatively, the first change is a mirror image and rotated 90° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-y 2 -h 2 , y 1 = lcd_h-x 2 -w 2 , w 1 = h 2 , h 1 = w 2 ;

或者,所述第一变化为镜像且顺时针旋转180°,所述第一转换函数对应于:x1=lcd_w-x2-w2,y1=y2,w1=w2,h1=h2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 1 = lcd_w - x 2 - w 2 , y 1 = y 2 , w 1 = w 2 , h 1 = h 2 ;

或者,所述第一变化为镜像且顺时针旋转270°,所述第一转换函数对应于:x1=y2,y1=x2,w1=h2,h1=w2Alternatively, the first change is a mirror image and a 270° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 , w 1 =h 2 , h 1 =w 2 ;

其中,所述x1为所述原始图像中的第一窗口上的第一坐标点的横坐标,所述y1为所述原始图像中的第一窗口上的第一坐标点的纵坐标,所述x2为所述目标图像中的第二窗口上的第二坐标点的横坐标,所述y2为所述目标图像中的第二窗口上的第二坐标点的纵坐标,所述w1为所述第一窗口的宽,所述h1为所述第一窗口的高,所述w2为所述第二窗口的宽,所述h2为所述第二窗口的高,所述lcd_w为所述屏幕的分辨率的宽,所述lcd_h为所述屏幕的分辨率的高,所述第二窗口为所述第一窗口经过所述第一变化后对应的窗口,所述第二窗口上的第二坐标点为所述第一窗口上的第一坐标点经过所述第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point on the first window in the original image, y1 is the vertical coordinate of the first coordinate point on the first window in the original image, x2 is the horizontal coordinate of the second coordinate point on the second window in the target image, y2 is the vertical coordinate of the second coordinate point on the second window in the target image, w1 is the width of the first window, h1 is the height of the first window, w2 is the width of the second window, h2 is the height of the second window, lcd_w is the width of the resolution of the screen, lcd_h is the height of the resolution of the screen, the second window is the window corresponding to the first window after the first change, and the second coordinate point on the second window is the coordinate point corresponding to the first coordinate point on the first window after the first change.

在本申请实施方式中,提供了一种得到目标图像的可能的具体实施方式,具体为,若原始图像为矩形窗口,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中矩形窗口的坐标点(即第一窗口上的第一坐标点)与目标图像中矩形窗口的坐标点(即第二窗口上的第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, a possible specific implementation method for obtaining a target image is provided. Specifically, if the original image is a rectangular window, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between the coordinate point of the rectangular window in the original image (i.e., the first coordinate point on the first window) and the coordinate point of the rectangular window in the target image (i.e., the second coordinate point on the second window), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

在一种可能的实施方式中,若所述原始图像为不规则图案,所述第一变化为顺时针旋转90°,所述第一转换函数对应于:x2=h-1-y1,y2=x1In a possible implementation manner, if the original image is an irregular pattern, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 2 =h-1-y 1 , y 2 =x 1 ;

或者,所述第一变化为顺时针旋转180°,所述第一转换函数对应于:x2=w-1-x1,y2=h-1-y1Alternatively, the first change is a 180° clockwise rotation, and the first conversion function corresponds to: x 2 =w-1-x 1 , y 2 =h-1-y 1 ;

或者,所述第一变化为顺时针旋转270°,所述第一转换函数对应于:x2=y1,y2=w-1-x1Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 2 =y 1 , y 2 =w-1-x 1 ;

或者,所述第一变化为镜像,所述第一转换函数对应于:x2=x1,y2=h-1-y1Alternatively, the first change is a mirror image, and the first conversion function corresponds to: x 2 =x 1 , y 2 =h-1-y 1 ;

或者,所述第一变化为镜像且顺时针旋转90°,所述第一转换函数对应于:x2=y1,y2=x1Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 2 =y 1 , y 2 =x 1 ;

或者,所述第一变化为镜像且顺时针旋转180°,所述第一转换函数对应于:x2=w-1-x1,y2=y1Alternatively, the first change is a mirror image and a 180° clockwise rotation, and the first conversion function corresponds to: x 2 =w-1-x 1 , y 2 =y 1 ;

或者,所述第一变化为镜像且顺时针旋转270°,所述第一转换函数对应于:x2=h-1-y1,y2=w-1-x1Alternatively, the first change is a mirror image and a 270° clockwise rotation, and the first conversion function corresponds to: x 2 =h-1-y 1 , y 2 =w-1-x 1 ;

其中,所述x1为所述原始图像中的第一像素点的横坐标,所述y1为所述原始图像中的第一像素点的纵坐标,所述x2为所述目标图像中的第二像素点的横坐标,所述y2为所述目标图像中的第二像素点的纵坐标,所述w为所述原始图像的宽,所述h为所述原始图像的高,所述第二像素点为所述第一像素点经过所述第一变化后对应的像素点。Among them, x1 is the horizontal coordinate of the first pixel point in the original image, y1 is the vertical coordinate of the first pixel point in the original image, x2 is the horizontal coordinate of the second pixel point in the target image, y2 is the vertical coordinate of the second pixel point in the target image, w is the width of the original image, h is the height of the original image, and the second pixel point is the pixel point corresponding to the first pixel point after the first change.

在本申请实施方式中,提供了一种得到目标图像的可能的具体实施方式,具体为,若原始图像为不规则图案,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中的像素点(即第一像素点)与目标图像中的像素点(即第二像素点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, a possible specific implementation method for obtaining a target image is provided. Specifically, if the original image is an irregular pattern, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between a pixel point in the original image (i.e., a first pixel point) and a pixel point in the target image (i.e., a second pixel point), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

第二方面,本申请实施例提供一种电子设备,所述电子设备包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述第一方面以及任一项可能的实施方式的方法。In a second aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method of the above-mentioned first aspect and any possible implementation method when executing the computer program.

第三方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质用于存储计算机程序(也可以称为代码,或指令);当所述计算机程序在计算机上运行时,使得上述第一方面以及任一项可能的实施方式的方法被实现。In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which is used to store a computer program (also referred to as code, or instructions); when the computer program is run on a computer, the method of the above-mentioned first aspect and any possible implementation method is implemented.

第四方面,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括:计算机程序(也可以称为代码,或指令);当所述计算机程序被运行时,使得计算机执行上述第一方面以及任一项可能的实施方式的方法。In a fourth aspect, an embodiment of the present application provides a computer program product, which includes: a computer program (also referred to as code, or instructions); when the computer program is executed, the computer executes the method of the above-mentioned first aspect and any possible implementation method.

第五方面,本申请实施例提供一种显示系统,该显示系统包括:依次通信连接的主机、显示驱动芯片及屏幕;In a fifth aspect, an embodiment of the present application provides a display system, the display system comprising: a host, a display driver chip and a screen that are communicatively connected in sequence;

在所述屏幕的方向发生第一变化时,所述主机用于获取与所述第一变化对应的第一转换函数,并将原始图像按照所述第一转换函数进行转换,得到目标图像;When a first change occurs in the direction of the screen, the host is used to obtain a first conversion function corresponding to the first change, and convert the original image according to the first conversion function to obtain a target image;

所述主机还用于将所述目标图像写入所述显示驱动芯片的图像显示存储器;The host is also used to write the target image into the image display memory of the display driver chip;

所述显示驱动芯片用于读取所述图像显示存储器的目标图像,并将其通过所述屏幕进行显示;The display driver chip is used to read the target image from the image display memory and display it through the screen;

所述屏幕用于显示所述目标图像。The screen is used to display the target image.

可选的,第一变化及其对应的第一转换函数,可以如上述第一方面以及任一项可能的实施方式的方法所述,此处不再赘述。Optionally, the first change and its corresponding first conversion function may be as described in the above-mentioned first aspect and any possible implementation method, and will not be described in detail here.

此外,在执行上述第一方面以及任一项可能的实施方式所述的方法的过程中,上述方法中有关发送信息和/或接收信息等的过程,可以理解为由处理器输出信息的过程,和/或,处理器接收输入的信息的过程。在输出信息时,处理器可以将信息输出给收发器(或者通信接口、或发送模块),以便由收发器进行发射。信息在由处理器输出之后,还可能需要进行其他的处理,然后才到达收发器。类似的,处理器接收输入的信息时,收发器(或者通信接口、或发送模块)接收信息,并将其输入处理器。更进一步的,在收发器收到该信息之后,该信息可能需要进行其他的处理,然后才输入处理器。In addition, in the process of executing the method described in the first aspect and any possible implementation method, the process of sending information and/or receiving information in the above method can be understood as the process of outputting information by the processor, and/or the process of receiving input information by the processor. When outputting information, the processor can output the information to the transceiver (or communication interface, or sending module) so that it can be transmitted by the transceiver. After the information is output by the processor, it may also need to be processed in other ways before it reaches the transceiver. Similarly, when the processor receives input information, the transceiver (or communication interface, or sending module) receives the information and inputs it into the processor. Furthermore, after the transceiver receives the information, the information may need to be processed in other ways before it is input into the processor.

基于上述原理,举例来说,前述方法中提及的发送信息可以理解为处理器输出信息。又例如,接收信息可以理解为处理器接收输入的信息。Based on the above principle, for example, the sending information mentioned in the above method can be understood as the processor outputting information. For another example, the receiving information can be understood as the processor receiving input information.

可选的,对于处理器所涉及的发射、发送和接收等操作,如果没有特殊说明,或者,如果未与其在相关描述中的实际作用或者内在逻辑相抵触,则均可以更加一般性的理解为处理器输出和接收、输入等操作。Optionally, for the operations of transmitting, sending and receiving involved in the processor, if there is no special explanation, or if they do not conflict with their actual functions or internal logic in the relevant descriptions, they can be more generally understood as operations such as processor output, reception and input.

可选的,在执行上述第一方面以及任一项可能的实施方式所述的方法的过程中,上述处理器可以是专门用于执行这些方法的处理器,也可以是通过执行存储器中的计算机指令来执行这些方法的处理器,例如通用处理器。上述存储器可以为非瞬时性(non-transitory)存储器,例如只读存储器(Read Only Memory,ROM),其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型以及存储器与处理器的设置方式不做限定。Optionally, in the process of executing the method described in the first aspect and any possible implementation method, the processor may be a processor specifically used to execute these methods, or a processor that executes these methods by executing computer instructions in a memory, such as a general-purpose processor. The memory may be a non-transitory memory, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or may be separately arranged on different chips. The embodiment of the present application does not limit the type of memory and the arrangement of the memory and the processor.

在一种可能的实施方式中,上述至少一个存储器位于装置之外。In a possible implementation manner, the at least one memory is located outside the device.

在又一种可能的实施方式中,上述至少一个存储器位于装置之内。In yet another possible implementation, the at least one memory is located within the device.

在又一种可能的实施方式之中,上述至少一个存储器的部分存储器位于装置之内,另一部分存储器位于装置之外。In yet another possible implementation, part of the at least one memory is located inside the device, and another part of the memory is located outside the device.

本申请中,处理器和存储器还可能集成于一个器件中,即处理器和存储器还可以被集成在一起。In the present application, the processor and the memory may also be integrated into one device, that is, the processor and the memory may also be integrated together.

本申请实施例中,在显示面板发生方向变化的情况下,向显存传输图像数据之前,先对原始图像进行相同的方向变化,再将方向变化后的图像数据传输至显存,使显存写入图像数据的方向与读取图像数据的方向相同,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, when the display panel changes direction, before transmitting image data to the video memory, the original image is first subjected to the same direction change, and then the image data after the direction change is transmitted to the video memory, so that the direction in which the image data is written to the video memory is the same as the direction in which the image data is read, thereby solving the problem of image fragmentation when the screen is refreshed due to screen rotation.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例中所需要使用的附图作简单地介绍,显而易见地,下面所描述的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

图1A为本申请实施例提供的一种显示效果的示意图;FIG1A is a schematic diagram of a display effect provided by an embodiment of the present application;

图1B为本申请实施例提供的一种显示效果的示意图;FIG1B is a schematic diagram of a display effect provided by an embodiment of the present application;

图2为本申请实施例提供的一种通信系统的架构示意图;FIG2 is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

图3A为本申请实施例提供的一种显示效果的示意图;FIG3A is a schematic diagram of a display effect provided by an embodiment of the present application;

图3B为本申请实施例提供的一种显示效果的示意图;FIG3B is a schematic diagram of a display effect provided by an embodiment of the present application;

图4为本申请实施例提供的一种显示效果的示意图;FIG4 is a schematic diagram of a display effect provided by an embodiment of the present application;

图5为本申请实施例提供的一种显示方法的流程示意图;FIG5 is a schematic diagram of a flow chart of a display method provided in an embodiment of the present application;

图6A至图6H为本申请实施例提供的显示图像方向变化的示意图;6A to 6H are schematic diagrams showing changes in the direction of an image provided by an embodiment of the present application;

图7A至图7H为本申请实施例提供的显示图像方向变化的示意图;7A to 7H are schematic diagrams showing changes in the direction of an image provided by an embodiment of the present application;

图8为本申请实施例提供的显示图像方向变化的流程示意图;FIG8 is a schematic diagram of a flow chart of displaying image direction changes according to an embodiment of the present application;

图9A至图9H为本申请实施例提供的显示图像方向变化的示意图。9A to 9H are schematic diagrams showing changes in the direction of an image provided by an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

为了使本申请的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图对本申请实施例进行描述。In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。The terms "first" and "second" in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

在本文中提及的“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员可以显式地和隐式地理解的是,在本申请的各个实施例中,如果没有特殊说明以及逻辑冲突,各个实施例之间的术语和/或描述具有一致性、且可以相互引用,不同的实施例中的技术特征根据其内在的逻辑关系可以组合形成新的实施例。The "embodiment" mentioned in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that in the various embodiments of the present application, if there is no special explanation and logical conflict, the terms and/or descriptions between the various embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

应当理解,在本申请中,“至少一个(项)”是指一个或者多个,“多个”是指两个或两个以上,“至少两个(项)”是指两个或三个及三个以上,“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系,例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项(个)”或其类似表达,是指这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b或c中的至少一项(个),可以表示:a,b,c,“a和b”,“a和c”,“b和c”,或“a和b和c”,其中a,b,c可以是单个,也可以是多个。It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, "at least two (items)" means two or three and more than three, and "and/or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and/or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character "/" generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

需要说明的是,在本申请中,“指示”可以包括直接指示、间接指示、显示指示、隐式指示。当描述某一指示信息用于指示A时,可以理解为该指示信息携带A、直接指示A,或间接指示A。It should be noted that in this application, "indication" may include direct indication, indirect indication, explicit indication, and implicit indication. When describing that a certain indication information is used to indicate A, it can be understood that the indication information carries A, directly indicates A, or indirectly indicates A.

本申请中,指示信息所指示的信息,称为待指示信息。在具体实现过程中,对待指示信息进行指示的方式有很多种,例如但不限于,可以直接指示待指示信息,如待指示信息本身或者该待指示信息的索引等。也可以通过指示其它信息来间接指示待指示信息,其中该其它信息与待指示信息之间存在关联关系。还可以仅仅指示待指示信息的一部分,而待指示信息的其它部分则是已知的或者提前约定的。例如,还可以借助预先约定(例如协议规定)的各个信息的排列顺序来实现对特定信息的指示,从而在一定程度上降低指示开销。待指示信息可以作为一个整体一起发送,也可以分成多个子信息分开发送,而且这些子信息的发送周期和/或发送时机可以相同,也可以不同。具体发送方法本申请不进行限定。其中,这些子信息的发送周期和/或发送时机可以是预先定义的,例如根据协议预先定义的,也可以是发射端设备通过向接收端设备发送配置信息来配置的。In the present application, the information indicated by the indication information is referred to as the information to be indicated. In the specific implementation process, there are many ways to indicate the information to be indicated, such as but not limited to, the information to be indicated can be directly indicated, such as the information to be indicated itself or the index of the information to be indicated. The information to be indicated can also be indirectly indicated by indicating other information, wherein there is an association relationship between the other information and the information to be indicated. It is also possible to indicate only a part of the information to be indicated, while the other parts of the information to be indicated are known or agreed in advance. For example, the indication of specific information can also be achieved by means of the arrangement order of each information agreed in advance (for example, specified by the protocol), thereby reducing the indication overhead to a certain extent. The information to be indicated can be sent together as a whole, or it can be divided into multiple sub-information and sent separately, and the sending period and/or sending time of these sub-information can be the same or different. The specific sending method is not limited in this application. Among them, the sending period and/or sending time of these sub-information can be pre-defined, for example, pre-defined according to the protocol, or can be configured by the transmitting end device by sending configuration information to the receiving end device.

需要说明的是,本申请中“发送”可以理解为“输出”,“接收”可以理解为“输入”。“向A发送信息”,其中“向A”只是表示信息传输的走向,A是目的地,不限制“向A发送信息”一定是空口上的直接发送。“向A发送信息”包括直接向A发送信息,也包括通过发射机间接向A发送信息,所以“向A发送信息”也可以理解为“输出去向A的信息”。同理,“接收来自A的信息”,表示该信息的来源是A,包括直接从A接收信息,也包括通过接收机间接接收来自A的信息,所以“接收来自A的信息”也可以理解为“输入来自A的信息”。It should be noted that in this application, "send" can be understood as "output", and "receive" can be understood as "input". "Send information to A", where "to A" only indicates the direction of information transmission, A is the destination, and does not limit "sending information to A" to direct transmission on the air interface. "Sending information to A" includes sending information directly to A, and also includes sending information to A indirectly through a transmitter, so "sending information to A" can also be understood as "outputting information to A". Similarly, "receiving information from A" indicates that the source of the information is A, including receiving information directly from A, and also includes receiving information indirectly from A through a receiver, so "receiving information from A" can also be understood as "inputting information from A".

本申请提供了一种显示方法,应用于图像显示技术领域,如薄膜晶体管-液晶显示器(thin film transistor-liquid crystal display,TFT-LCD)的图像显示。为了更清楚地描述本申请的方案,下面先介绍一些与图像显示相关的知识。The present application provides a display method, which is applied to the field of image display technology, such as image display of thin film transistor-liquid crystal display (TFT-LCD). In order to more clearly describe the solution of the present application, some knowledge related to image display is first introduced below.

在手持终端设备等领域中,TFT-LCD常常被用作图像显示,并且经常对其进行旋转后显示图像。目前常见的TFT-LCD驱动芯片几乎都自带有硬件旋转功能,可通过配置其他内部寄存器来让屏幕旋转显示。In the field of handheld terminal equipment, TFT-LCD is often used for image display, and the image is often displayed after being rotated. Currently, most common TFT-LCD driver chips have built-in hardware rotation function, which can rotate the screen by configuring other internal registers.

但是,当屏幕旋转后,由于图像的像素数据在写入图像显示存储器(graphicrandom access memory,G-RAM)与读出的方向不一致,导致屏幕在刷新画面时存在画面割裂的现象。However, when the screen is rotated, the pixel data of the image is written into and read from the graphic random access memory (G-RAM) in inconsistent directions, resulting in a phenomenon of image fragmentation when the screen is refreshed.

请参阅图1A,图1A为本申请实施例提供的一种显示效果的示意图。Please refer to FIG. 1A , which is a schematic diagram of a display effect provided by an embodiment of the present application.

如图1A所示,为显示面板顺时针旋转90°的情况下,画面刷新时显示的斜向的割裂画面,沿着虚线将显示区域割裂成黄色区域、黄色蓝色渐变区域、蓝色区域从左上区域到右下区域依次排布。As shown in FIG1A , when the display panel is rotated 90° clockwise, a diagonally split screen is displayed when the screen is refreshed, and the display area is split into a yellow area, a yellow-blue gradient area, and a blue area along the dotted lines, arranged in sequence from the upper left area to the lower right area.

请参阅图1B,图1A为本申请实施例提供的一种显示效果的示意图。Please refer to FIG. 1B , FIG. 1A is a schematic diagram of a display effect provided by an embodiment of the present application.

如图1B所示,为显示面板顺时针旋转180°的情况下,画面刷新时显示的纵向的割裂画面,如图1B中的(1)所示,沿着虚线将显示区域割裂成黄色区域、蓝色区域从上到下依次排布;如图1B中的(2)所示,沿着虚线将显示区域割裂成黄色区域、蓝色区域从上到下依次排布。As shown in FIG1B , when the display panel is rotated 180° clockwise, a vertically split screen is displayed when the screen is refreshed. As shown in (1) in FIG1B , the display area is split along the dotted line into a yellow area and a blue area, which are arranged in sequence from top to bottom; as shown in (2) in FIG1B , the display area is split along the dotted line into a yellow area and a blue area, which are arranged in sequence from top to bottom.

上述屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题,仅在有些支持硬件控制器旋转图像的主控芯片产品中才得以改善,比如支持图像信号处理器(image signalprocessor,ISP)的主控芯片。然而,并不是所有的主控芯片都带有该类控制器,因此,如何解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题成为了重点研究课题。The above-mentioned screen rotation causes the screen to be fragmented when refreshing the picture, which can only be improved in some main control chip products that support hardware controllers to rotate images, such as main control chips that support image signal processors (ISPs). However, not all main control chips have such controllers. Therefore, how to solve the problem of screen fragmentation when refreshing the picture caused by screen rotation has become a key research topic.

请参阅图2,图2为本申请实施例提供的一种通信系统的架构示意图。Please refer to FIG. 2 , which is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application.

如图2所示,该通信系统包括主控芯片(Host)和显示屏。As shown in FIG2 , the communication system includes a host chip (Host) and a display screen.

其中,该主控芯片(Host)包括RAM,该显示屏包括G-RAM和显示面板(Panel),该显示屏具体可以是TFT-LCD,本申请实施例对此不作限制。Among them, the main control chip (Host) includes RAM, the display screen includes G-RAM and a display panel (Panel), and the display screen can specifically be TFT-LCD, which is not limited in the embodiment of the present application.

G-RAM用于缓存主控芯片(Host)通过串/并口传输过来的图像数据,并由控制器以图像流或视频流方式不停地、循环地从G-RAM中读取图像数据并刷新到显示面板上进行显示。G-RAM is used to cache image data transmitted from the host chip (Host) through the serial/parallel port, and the controller continuously and cyclically reads image data from G-RAM in the form of image stream or video stream and refreshes it to the display panel for display.

TFT-LCD驱动芯片虽然本身具备硬件旋转功能,但由于旋转之后屏幕内部G-RAM的写入和读取方向不一致,导致了在屏幕上可以明显看到纵向或斜向的割裂画面。Although the TFT-LCD driver chip itself has a hardware rotation function, the writing and reading directions of the G-RAM inside the screen are inconsistent after rotation, resulting in obvious vertical or diagonal split images on the screen.

请参阅图3A,图3A为本申请实施例提供的一种显示效果的示意图。Please refer to FIG. 3A , which is a schematic diagram of a display effect provided by an embodiment of the present application.

如图3A所示,为旋转90°时,屏幕驱动芯片内部G-RAM在写入和取出方向的差异示意图。图3A中的实线箭头为图像数据写入GRAM的方向,图3A中的虚线箭头为图像数据从GRAM取出的方向,由于写入和取出的方向互相垂直,导致屏幕在画面刷新时存在画面斜向割裂的现象。As shown in Figure 3A, it is a schematic diagram of the difference in the writing and fetching directions of the G-RAM inside the screen driver chip when rotated 90 degrees. The solid arrow in Figure 3A is the direction in which the image data is written into the GRAM, and the dotted arrow in Figure 3A is the direction in which the image data is fetched from the GRAM. Since the writing and fetching directions are perpendicular to each other, the screen will be split diagonally when the screen is refreshed.

请参阅图3B,图3B为本申请实施例提供的一种显示效果的示意图。Please refer to FIG. 3B , which is a schematic diagram of a display effect provided by an embodiment of the present application.

如图3B所示,为旋转180°时,屏幕驱动芯片内部G-RAM在写入和取出方向的差异示意图。图3B中的实线箭头为图像数据写入GRAM的方向,图3B中的虚线箭头为图像数据从GRAM取出的方向,由于写入和取出的方向纵向相反,G-RAM在自上而下地读取图像数据,而新的图像数据在自下而上地更新,写入操作和取出操作互相接近。在某一时刻,这两个操作将重叠,便形成了纵向割裂的画面,导致屏幕在画面刷新时存在画面纵向割裂的现象。As shown in FIG3B , it is a schematic diagram of the difference in the writing and fetching directions of the G-RAM inside the screen driver chip when it is rotated 180°. The solid arrow in FIG3B is the direction in which the image data is written into the GRAM, and the dotted arrow in FIG3B is the direction in which the image data is fetched from the GRAM. Since the writing and fetching directions are opposite in the vertical direction, the G-RAM reads the image data from top to bottom, and the new image data is updated from bottom to top, and the writing operation and the fetching operation are close to each other. At a certain moment, these two operations will overlap, forming a vertically split screen, resulting in the phenomenon of vertical screen splitting when the screen is refreshed.

为解决上述屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题,便需要保证G-RAM的图像数据写入与读出方向一致。可以从主控芯片(Host)侧入手,在主控芯片中先将图像数据进行旋转处理,再传入到TFT-LCD的G-RAM中。In order to solve the problem of screen tearing when refreshing the screen due to screen rotation, it is necessary to ensure that the writing and reading directions of the image data in the G-RAM are consistent. This can be done from the host chip side, where the image data is first rotated and then transferred to the G-RAM of the TFT-LCD.

请参阅图4,图4为本申请实施例提供的一种显示效果的示意图。Please refer to FIG. 4 , which is a schematic diagram of a display effect provided in an embodiment of the present application.

如图4所示,为旋转90°时,主控芯片先将图像数据进行旋转处理,再传入到TFT-LCD的G-RAM中。图4中的实线箭头为图像数据写入GRAM的方向,图4中的虚线箭头为图像数据从GRAM取出的方向,由于G-RAM的图像数据写入与读出方向一致(均为自上而下的方向),画面刷新时将不再存在割裂的现象。As shown in Figure 4, when rotating 90°, the main control chip first rotates the image data and then transmits it to the G-RAM of the TFT-LCD. The solid arrow in Figure 4 is the direction in which the image data is written into the GRAM, and the dotted arrow in Figure 4 is the direction in which the image data is taken out of the GRAM. Since the image data writing and reading directions of the G-RAM are consistent (both are from top to bottom), there will be no fragmentation when the screen is refreshed.

可以理解的是,要保证画面刷新时不存在割裂的现象,还需要使能帧同步功能和保证G-RAM的存入速率大于取出速率。It is understandable that in order to ensure that there is no fragmentation when the screen is refreshed, it is also necessary to enable the frame synchronization function and ensure that the storage rate of the G-RAM is greater than the retrieval rate.

可以理解的是,图4所示的显示方法可实现的方案包括但不限于以下两种:It is understandable that the display method shown in FIG4 can be implemented in the following two solutions, including but not limited to:

一种是主控芯片带有LCD控制器、ISP控制器等具备图像旋转功能,可以交由硬件控制器来实现图像的“硬”旋转,再将旋转后的数据传入TFT-LCD中;One is that the main control chip has an LCD controller, ISP controller, etc. with image rotation function, which can be handed over to the hardware controller to realize the "hard" rotation of the image, and then the rotated data is transmitted to the TFT-LCD;

另一种是适用于不带有图像旋转功能的主控芯片,使用软件算法方式对图像进行“软”旋转,再将旋转后的数据传入TFT-LCD中。The other is suitable for the main control chip without image rotation function, which uses software algorithm to perform "soft" rotation on the image and then transmits the rotated data to the TFT-LCD.

相应的,本申请实施例提供了一种显示方法,下面结合图5进行说明。Accordingly, an embodiment of the present application provides a display method, which is described below in conjunction with FIG. 5 .

请参阅图5,图5为本申请实施例提供的一种显示方法的流程示意图,该显示方法应用于图像显示技术领域,如TFT-LCD的图像显示,该显示方法应用于显示系统,该显示系统包括依次通信连接的主机、显示驱动芯片及屏幕,该显示方法包括但不限于如下步骤:Please refer to FIG. 5 , which is a flow chart of a display method provided in an embodiment of the present application. The display method is applied to the field of image display technology, such as image display of TFT-LCD. The display method is applied to a display system, which includes a host, a display driver chip and a screen that are sequentially connected in communication. The display method includes but is not limited to the following steps:

S501:在屏幕的方向发生第一变化时,主机获取与第一变化对应的第一转换函数,并将原始图像按照第一转换函数进行转换,得到目标图像。S501: When a first change occurs in the direction of the screen, the host obtains a first conversion function corresponding to the first change, and converts the original image according to the first conversion function to obtain a target image.

S502:主机将目标图像写入显示驱动芯片的图像显示存储器。S502: The host writes the target image into the image display memory of the display driver chip.

S503:显示驱动芯片读取图像显示存储器的目标图像,并将其通过屏幕进行显示。S503: The display driver chip reads the target image from the image display memory and displays it on the screen.

可理解,本申请实施例中的显示驱动芯片为可用于执行计算机执行指令的处理器/芯片,本申请实施例对此不作限制。可选的,显示驱动芯片具体可以包括上述图2中的G-RAM,用于参与执行本申请实施例中的显示方法,以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。It is understood that the display driver chip in the embodiment of the present application is a processor/chip that can be used to execute computer execution instructions, and the embodiment of the present application is not limited to this. Optionally, the display driver chip can specifically include the G-RAM in Figure 2 above, which is used to participate in the execution of the display method in the embodiment of the present application to solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可理解,本申请实施例中的主机为搭载了可用于执行计算机执行指令的处理器/芯片的设备,也可以是可用于执行计算机执行指令的处理器/芯片,本申请实施例对此不作限制。可选的,主机具体可以是上述图2中的主控芯片(Host),用于执行本申请实施例中的显示方法,以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。It is understood that the host in the embodiment of the present application is a device equipped with a processor/chip that can be used to execute computer-executable instructions, and can also be a processor/chip that can be used to execute computer-executable instructions, and the embodiment of the present application does not limit this. Optionally, the host can be the main control chip (Host) in Figure 2 above, which is used to execute the display method in the embodiment of the present application to solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

本申请实施例中,由于原始图像的方向变化与屏幕的方向变化相同,目标图像写入显示驱动芯片的图像显示存储器的方向与读取图像显示存储器的目标图像的方向也相同,因此,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,可以解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In the embodiment of the present application, since the direction change of the original image is the same as the direction change of the screen, the direction in which the target image is written to the image display memory of the display driver chip is also the same as the direction in which the target image is read from the image display memory. Therefore, even if the direction of the screen changes, there will no longer be a phenomenon of screen fragmentation when the screen is refreshed, which can solve the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可以理解的是,对于一个TFT-LCD屏幕来说,软件要实现的基础功能,便是画点、画线、画窗口(如矩形等图形)、传输图案等驱动功能,而方向变化(如旋转、镜像等方向变化)功能,则是嵌套到这些功能之中,做到“先方向变化后传输”的原则。It is understandable that for a TFT-LCD screen, the basic functions that the software needs to implement are driving functions such as drawing dots, lines, windows (such as rectangles and other graphics), and transmitting patterns, while the direction change function (such as rotation, mirroring, etc.) is nested into these functions to achieve the principle of "direction change first, then transmission".

如此,在原来的画点、线、窗口(矩形)、图案的功能函数之上,加入对坐标点、线段端点、图案窗口(矩形)、图案数据等的方向变化(旋转、镜像等)操作,即可实现新的带软件方向变化(旋转、镜像等)功能的画点、线、窗口(矩形)、图案功能。In this way, on top of the original function of drawing points, lines, windows (rectangles), and patterns, operations of direction change (rotation, mirroring, etc.) of coordinate points, line segment endpoints, pattern windows (rectangles), pattern data, etc. are added, thereby realizing new functions of drawing points, lines, windows (rectangles), and patterns with software direction change (rotation, mirroring, etc.) functions.

下面将以坐标点、线段、窗口(矩形)以及图案顺时针旋转90°、180°、270°,和垂直镜像及镜像后旋转90°、180°、270°为例,展开详细介绍原始图像变化为目标图像的实现原理。The following will take the clockwise rotation of coordinate points, line segments, windows (rectangles) and patterns by 90°, 180°, 270°, and vertical mirroring and rotation of 90°, 180°, 270° after mirroring as examples to explain in detail the implementation principle of changing the original image into the target image.

实施例一:坐标点的方向变化。Embodiment 1: Direction change of coordinate points.

若原始图像为坐标点,第一变化为顺时针旋转90°,第一转换函数对应为x1=y2,y1=lcd_h-1-x2If the original image is a coordinate point, the first change is a 90° clockwise rotation, and the first conversion function corresponds to x 1 =y 2 , y 1 =lcd_h-1-x 2 ;

或者,第一变化为顺时针旋转180°,第一转换函数对应为x1=lcd_w-1-x2,y1=lcd_h-1-y2Alternatively, the first change is a clockwise rotation of 180°, and the first conversion function corresponds to x 1 = lcd_w-1-x 2 , y 1 = lcd_h-1-y 2 ;

或者,第一变化为顺时针旋转270°,第一转换函数对应于:x1=lcd_w-1-y2,y1=x2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = x 2 ;

或者,第一变化为镜像,第一转换函数对应于:x1=x2,y1=lcd_h-1-y2Alternatively, the first change is a mirror image, and the first transfer function corresponds to: x 1 =x 2 , y 1 =lcd_h-1-y 2 ;

或者,第一变化为镜像且顺时针旋转90°,第一转换函数对应于:x1=y2,y1=x2Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 ;

或者,第一变化为镜像且顺时针旋转180°,第一转换函数对应于:x1=lcd_w-1-x2,y1=y2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = y 2 ;

或者,第一变化为镜像且顺时针旋转270°,第一转换函数对应于:x1=lcd_w-1-y2,y1=lcd_h-1-x2Alternatively, the first change is a mirror image and rotated 270° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = lcd_h-1-x 2 ;

其中,x1为原始图像中的第一坐标点的横坐标,y1为原始图像中的第一坐标点的纵坐标,x2为目标图像中的第二坐标点的横坐标,y2为目标图像中的第二坐标点的纵坐标,lcd_w为屏幕的分辨率的宽,lcd_h为屏幕的分辨率的高,第二坐标点为第一坐标点经过第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point in the original image, y1 is the vertical coordinate of the first coordinate point in the original image, x2 is the horizontal coordinate of the second coordinate point in the target image, y2 is the vertical coordinate of the second coordinate point in the target image, lcd_w is the width of the screen resolution, lcd_h is the height of the screen resolution, and the second coordinate point is the coordinate point corresponding to the first coordinate point after the first change.

在本申请实施例中,若原始图像为坐标点,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中的坐标点(即第一坐标点)与目标图像中的坐标点(即第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, if the original image is a coordinate point, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between the coordinate point in the original image (i.e., the first coordinate point) and the coordinate point in the target image (i.e., the second coordinate point), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no longer a phenomenon of screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可选的,其具体实现方式可以如下:Optionally, the specific implementation method may be as follows:

获取原始图像中的第一坐标点和目标图像中的第二坐标点,第二坐标点为第一坐标点随原始图像经过方向变化后对应的坐标点;Obtaining a first coordinate point in the original image and a second coordinate point in the target image, where the second coordinate point is a coordinate point corresponding to the first coordinate point after the direction of the original image changes;

基于第一坐标点和第二坐标点,确定坐标转换关系。Based on the first coordinate point and the second coordinate point, a coordinate conversion relationship is determined.

可以理解的是,根据屏幕的方向变化,对原始图像上的坐标点进行相同方向的变化,得到目标图像上对应的坐标点,并基于方向变化前后的坐标点,确定坐标转换关系。比如,获取原始图像中的第一坐标点,以及获取第一坐标点随原始图像经过方向变化后得到的目标图像中对应的第二坐标点,并基于第一坐标点和第二坐标点,确定坐标转换关系。通过本申请实施例,可以确定目标图像对应的图像数据。It is understandable that, according to the change in the direction of the screen, the coordinate points on the original image are changed in the same direction to obtain the corresponding coordinate points on the target image, and the coordinate conversion relationship is determined based on the coordinate points before and after the direction change. For example, the first coordinate point in the original image is obtained, and the corresponding second coordinate point in the target image obtained after the first coordinate point changes with the original image, and the coordinate conversion relationship is determined based on the first coordinate point and the second coordinate point. Through the embodiment of the present application, the image data corresponding to the target image can be determined.

可以理解的是,坐标点的旋转,可看成将一个屏旋转90°放置,想知道在屏上一个点的位置,可先求得对应原始不旋转放置时屏上该点的位置,即从目标屏幕上的点的坐标(x2,y2),求得原始屏幕上对应点的坐标(x1,y1)。知道其对应关系,即可得出坐标点的旋转算法。It can be understood that the rotation of coordinate points can be regarded as rotating a screen by 90°. To know the position of a point on the screen, the position of the point on the screen when it is originally placed without rotation can be first obtained, that is, from the coordinates of the point on the target screen (x 2 , y 2 ), the coordinates of the corresponding point on the original screen (x 1 , y 1 ) can be obtained. Knowing the corresponding relationship, the rotation algorithm of the coordinate points can be obtained.

下面结合表一以及图6A至图6H对坐标点的方向变化进一步说明。The direction change of the coordinate points is further described below in conjunction with Table 1 and FIGS. 6A to 6H .

其中,(x2,y2)为屏幕旋转后传入新画点函数的坐标点,对应函数中实际写入原始画点函数的坐标为(x1,y1),lcd_w、lcd_h为TFT-LCD分辨率的宽和高。Among them, (x 2 , y 2 ) is the coordinate point passed into the new drawing function after the screen is rotated, the coordinate of the original drawing function actually written into the corresponding function is (x 1 , y 1 ), and lcd_w and lcd_h are the width and height of the TFT-LCD resolution.

表一Table 1

实施例二:线段的方向变化。Embodiment 2: Direction change of a line segment.

若原始图像为线段,第一变化为顺时针旋转90°,第一转换函数对应于:x1=y2,y1=lcd_h-1-x2If the original image is a line segment, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =lcd_h-1-x 2 ;

或者,第一变化为顺时针旋转180°,第一转换函数对应于:x1=lcd_w-1-x2,y1=lcd_h-1-y2Alternatively, the first change is a 180° clockwise rotation, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = lcd_h-1-y 2 ;

或者,第一变化为顺时针旋转270°,第一转换函数对应于:x1=lcd_w-1-y2,y1=x2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = x 2 ;

或者,第一变化为镜像,第一转换函数对应于:x1=x2,y1=lcd_h-1-y2Alternatively, the first change is a mirror image, and the first transfer function corresponds to: x 1 =x 2 , y 1 =lcd_h-1-y 2 ;

或者,第一变化为镜像且顺时针旋转90°,第一转换函数对应于:x1=y2,y1=x2Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 ;

或者,第一变化为镜像且顺时针旋转180°,第一转换函数对应于:x1=lcd_w-1-x2,y1=y2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-x 2 , y 1 = y 2 ;

或者,第一变化为镜像且顺时针旋转270°,第一转换函数对应于:x1=lcd_w-1-y2,y1=lcd_h-1-x2Alternatively, the first change is a mirror image and rotated 270° clockwise, and the first conversion function corresponds to: x 1 = lcd_w-1-y 2 , y 1 = lcd_h-1-x 2 ;

其中,x1为原始图像中的第一线段上的第一坐标点的横坐标,y1为原始图像中的第一线段上的第一坐标点的纵坐标,x2为目标图像中的第二线段上的第二坐标点的横坐标,y2为目标图像中的第二线段上的第二坐标点的纵坐标,lcd_w为屏幕的分辨率的宽,lcd_h为屏幕的分辨率的高,第二线段为第一线段经过第一变化后对应的线段,第二线段上的第二坐标点为第一线段上的第一坐标点经过第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point on the first line segment in the original image, y1 is the vertical coordinate of the first coordinate point on the first line segment in the original image, x2 is the horizontal coordinate of the second coordinate point on the second line segment in the target image, y2 is the vertical coordinate of the second coordinate point on the second line segment in the target image, lcd_w is the width of the screen resolution, lcd_h is the height of the screen resolution, the second line segment is the line segment corresponding to the first line segment after the first change, and the second coordinate point on the second line segment is the coordinate point corresponding to the first coordinate point on the first line segment after the first change.

在本申请实施例中,若原始图像为线段,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中线段的坐标点(即第一线段上的第一坐标点)与目标图像中线段的坐标点(即第二线段上的第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, if the original image is a line segment, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between the coordinate point of the line segment in the original image (i.e., the first coordinate point on the first line segment) and the coordinate point of the line segment in the target image (i.e., the second coordinate point on the second line segment), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可选的,其具体实现方式可以如下:Optionally, the specific implementation method may be as follows:

获取原始图像中的第一线段的端点坐标和目标图像中的第二线段的端点坐标,第二线段为第一线段随原始图像经过方向变化后对应的线段;Obtaining the endpoint coordinates of the first line segment in the original image and the endpoint coordinates of the second line segment in the target image, where the second line segment is the line segment corresponding to the first line segment after the direction of the original image changes;

基于第一线段的端点坐标和第二线段的端点坐标,确定坐标转换关系。Based on the endpoint coordinates of the first line segment and the endpoint coordinates of the second line segment, a coordinate conversion relationship is determined.

可以理解的是,根据屏幕的方向变化,对原始图像上的线段进行相同方向的变化,得到目标图像上对应的线段,并基于方向变化前后的线段,确定坐标转换关系。比如,获取原始图像中的第一线段的端点坐标,以及获取第一线段的端点坐标随原始图像经过方向变化后得到的目标图像中对应的第二线段的端点坐标,并基于第一线段的端点坐标和第二线段的端点坐标,确定坐标转换关系。通过本申请实施例,可以确定目标图像对应的图像数据。It is understandable that, according to the change in the direction of the screen, the line segments on the original image are changed in the same direction to obtain the corresponding line segments on the target image, and the coordinate conversion relationship is determined based on the line segments before and after the direction change. For example, the endpoint coordinates of the first line segment in the original image are obtained, and the endpoint coordinates of the first line segment are obtained after the original image undergoes a direction change, and the corresponding endpoint coordinates of the second line segment in the target image are obtained, and the coordinate conversion relationship is determined based on the endpoint coordinates of the first line segment and the endpoint coordinates of the second line segment. Through the embodiment of the present application, the image data corresponding to the target image can be determined.

可以理解的是,线段的旋转可转换为起/止两个坐标点的旋转,可直接根据坐标点旋转,求出线段起始坐标点(xs1,ys1)旋转后的坐标点(xs2,ys2),和终止坐标点(xe1,ye1)旋转后的坐标点(xe2,ye2)。由于只是对坐标点进行旋转,其方法原理和上述实施例一介绍的一致,故此处不再赘述。It is understandable that the rotation of the line segment can be converted into the rotation of the two starting/ending coordinate points. The coordinate points can be directly rotated to obtain the coordinate point ( xs2 , ys2 ) after the rotation of the starting coordinate point ( xs1 , ys1 ) of the line segment, and the coordinate point ( xe2 , ye2 ) after the rotation of the ending coordinate point ( xe1 , ye1 ). Since only the coordinate points are rotated, the method principle is consistent with that described in the first embodiment, so it will not be repeated here.

实施例三:窗口(矩形)的方向变化。Embodiment 3: Change of direction of the window (rectangle).

若原始图像为矩形窗口,第一变化为顺时针旋转90°,第一转换函数对应于:x1=y2,y1=lcd_h-x2-w2,w1=h2,h1=w2If the original image is a rectangular window, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 1 =y 2 , y 1 =lcd_h-x 2 -w 2 , w 1 =h 2 , h 1 =w 2 ;

或者,第一变化为顺时针旋转180°,第一转换函数对应于:x1=lcd_w-x2-w2,y1=lcd_h-y2-h2,w1=w2,h1=h2Alternatively, the first change is a 180° clockwise rotation, and the first conversion function corresponds to: x 1 = lcd_w - x 2 - w 2 , y 1 = lcd_h - y 2 - h 2 , w 1 = w 2 , h 1 = h 2 ;

或者,第一变化为顺时针旋转270°,第一转换函数对应于:x1=lcd_w-y2-h2,y1=x2,w1=h2,h1=w2Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 1 = lcd_w - y 2 - h 2 , y 1 = x 2 , w 1 = h 2 , h 1 = w 2 ;

或者,第一变化为镜像,第一转换函数对应于:x1=x2,y1=lcd_h-y2-h2,w1=w2,h1=h2Alternatively, the first change is a mirror image, and the first transfer function corresponds to: x 1 =x 2 , y 1 =lcd_h-y 2 -h 2 , w 1 =w 2 , h 1 =h 2 ;

或者,第一变化为镜像且顺时针旋转90°,第一转换函数对应于:x1=lcd_w-y2-h2,y1=lcd_h-x2-w2,w1=h2,h1=w2Alternatively, the first change is a mirror image and rotated 90° clockwise, and the first transfer function corresponds to: x 1 = lcd_w-y 2 -h 2 , y 1 = lcd_h-x 2 -w 2 , w 1 = h 2 , h 1 = w 2 ;

或者,第一变化为镜像且顺时针旋转180°,第一转换函数对应于:x1=lcd_w-x2-w2,y1=y2,w1=w2,h1=h2Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first transfer function corresponds to: x 1 = lcd_w - x 2 - w 2 , y 1 = y 2 , w 1 = w 2 , h 1 = h 2 ;

或者,第一变化为镜像且顺时针旋转270°,第一转换函数对应于:x1=y2,y1=x2,w1=h2,h1=w2Alternatively, the first change is a mirror image and rotated 270° clockwise, and the first conversion function corresponds to: x 1 =y 2 , y 1 =x 2 , w 1 =h 2 , h 1 =w 2 ;

其中,x1为原始图像中的第一窗口上的第一坐标点的横坐标,y1为原始图像中的第一窗口上的第一坐标点的纵坐标,x2为目标图像中的第二窗口上的第二坐标点的横坐标,y2为目标图像中的第二窗口上的第二坐标点的纵坐标,w1为第一窗口的宽,h1为第一窗口的高,w2为第二窗口的宽,h2为第二窗口的高,lcd_w为屏幕的分辨率的宽,lcd_h为屏幕的分辨率的高,第二窗口为第一窗口经过第一变化后对应的窗口,第二窗口上的第二坐标点为第一窗口上的第一坐标点经过第一变化后对应的坐标点。Among them, x1 is the horizontal coordinate of the first coordinate point on the first window in the original image, y1 is the vertical coordinate of the first coordinate point on the first window in the original image, x2 is the horizontal coordinate of the second coordinate point on the second window in the target image, y2 is the vertical coordinate of the second coordinate point on the second window in the target image, w1 is the width of the first window, h1 is the height of the first window, w2 is the width of the second window, h2 is the height of the second window, lcd_w is the width of the screen resolution, lcd_h is the height of the screen resolution, the second window is the window corresponding to the first window after the first change, and the second coordinate point on the second window is the coordinate point corresponding to the first coordinate point on the first window after the first change.

在本申请实施例中,若原始图像为矩形窗口,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中矩形窗口的坐标点(即第一窗口上的第一坐标点)与目标图像中矩形窗口的坐标点(即第二窗口上的第二坐标点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, if the original image is a rectangular window, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between the coordinate point of the rectangular window in the original image (i.e., the first coordinate point on the first window) and the coordinate point of the rectangular window in the target image (i.e., the second coordinate point on the second window), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no longer a phenomenon of screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可选的,其具体实现方式可以如下:Optionally, the specific implementation method may be as follows:

获取原始图像中的第一窗口的起始点坐标和尺寸信息,以及目标图像中的第二窗口的起始点坐标和尺寸信息,第二窗口为第一窗口随原始图像经过方向变化后对应的窗口;Obtaining the starting point coordinates and size information of the first window in the original image, and the starting point coordinates and size information of the second window in the target image, where the second window is the window corresponding to the first window after the direction of the original image changes;

基于第一窗口的起始点坐标和尺寸信息,以及目标图像中的第二窗口的起始点坐标和尺寸信息,确定坐标转换关系。A coordinate conversion relationship is determined based on the starting point coordinates and size information of the first window and the starting point coordinates and size information of the second window in the target image.

可以理解的是,根据屏幕的方向变化,对原始图像上的窗口进行相同方向的变化,得到目标图像上对应的窗口,并基于方向变化前后的窗口,确定坐标转换关系。比如,获取原始图像中的第一窗口的起始坐标点和尺寸信息,以及获取第一窗口的起始坐标点和尺寸信息随原始图像经过方向变化后得到的目标图像中对应的第二窗口的起始坐标点和尺寸信息,并基于第一窗口的起始坐标点和尺寸信息和第二窗口的起始坐标点和尺寸信息,确定坐标转换关系。通过本申请实施例,可以确定目标图像对应的图像数据。It is understandable that, according to the change in the direction of the screen, the window on the original image is changed in the same direction to obtain the corresponding window on the target image, and the coordinate conversion relationship is determined based on the window before and after the direction change. For example, the starting coordinate point and size information of the first window in the original image are obtained, and the starting coordinate point and size information of the first window are obtained along with the starting coordinate point and size information of the first window. The corresponding second window in the target image obtained after the direction change, and the coordinate conversion relationship is determined based on the starting coordinate point and size information of the first window and the starting coordinate point and size information of the second window. Through the embodiment of the present application, the image data corresponding to the target image can be determined.

可以理解的是,TFT-LCD矩形旋转即是窗口的旋转,主要是对起始坐标的旋转和宽、高的旋转。在屏幕旋转放置后,对应指定的窗口位置需要转换到不旋转时的窗口位置,即是求旋转前的窗口位置。It can be understood that the rotation of the TFT-LCD rectangle is the rotation of the window, which mainly involves the rotation of the starting coordinates and the width and height. After the screen is rotated and placed, the corresponding specified window position needs to be converted to the window position when it is not rotated, that is, the window position before rotation.

下面结合表二以及图7A至图7H对线段的方向变化进一步说明。The change in direction of the line segment is further described below in conjunction with Table 2 and FIGS. 7A to 7H .

其中,(x1,y1)为旋转前的起始坐标点,w1和h1是旋转前的宽和高,(x2,y2)为旋转后的起始坐标点,w2和h2是旋转后的宽和高;lcd_w和lcd_h分别为TFT-LCD分辨率的宽和高。Among them, ( x1 , y1 ) is the starting coordinate point before rotation, w1 and h1 are the width and height before rotation, ( x2 , y2 ) is the starting coordinate point after rotation, w2 and h2 are the width and height after rotation; lcd_w and lcd_h are the width and height of the TFT-LCD resolution respectively.

表二Table 2

实施例四:图像的方向变化。Embodiment 4: Direction change of an image.

若原始图像为不规则图案,第一变化为顺时针旋转90°,第一转换函数对应于:x2=h-1-y1,y2=x1If the original image is an irregular pattern, the first change is a 90° clockwise rotation, and the first conversion function corresponds to: x 2 =h-1-y 1 , y 2 =x 1 ;

或者,第一变化为顺时针旋转180°,第一转换函数对应于:x2=w-1-x1,y2=h-1-y1Alternatively, the first change is a 180° clockwise rotation, and the first conversion function corresponds to: x 2 =w-1-x 1 , y 2 =h-1-y 1 ;

或者,第一变化为顺时针旋转270°,第一转换函数对应于:x2=y1,y2=w-1-x1Alternatively, the first change is a clockwise rotation of 270°, and the first conversion function corresponds to: x 2 =y 1 , y 2 =w-1-x 1 ;

或者,第一变化为镜像,第一转换函数对应于:x2=x1,y2=h-1-y1Alternatively, the first change is a mirror image, and the first conversion function corresponds to: x 2 =x 1 , y 2 =h-1-y 1 ;

或者,第一变化为镜像且顺时针旋转90°,第一转换函数对应于:x2=y1,y2=x1Alternatively, the first change is a mirror image and a 90° clockwise rotation, and the first conversion function corresponds to: x 2 =y 1 , y 2 =x 1 ;

或者,第一变化为镜像且顺时针旋转180°,第一转换函数对应于:x2=w-1-x1,y2=y1Alternatively, the first change is a mirror image and rotated 180° clockwise, and the first conversion function corresponds to: x 2 =w-1-x 1 , y 2 =y 1 ;

或者,第一变化为镜像且顺时针旋转270°,第一转换函数对应于:x2=h-1-y1,y2=w-1-x1Alternatively, the first change is a mirror image and rotated 270° clockwise, and the first conversion function corresponds to: x 2 =h-1-y 1 , y 2 =w-1-x 1 ;

其中,x1为原始图像中的第一像素点的横坐标,y1为原始图像中的第一像素点的纵坐标,x2为目标图像中的第二像素点的横坐标,y2为目标图像中的第二像素点的纵坐标,w为原始图像的宽,h为原始图像的高,第二像素点为第一像素点经过第一变化后对应的像素点。Among them, x1 is the horizontal coordinate of the first pixel point in the original image, y1 is the vertical coordinate of the first pixel point in the original image, x2 is the horizontal coordinate of the second pixel point in the target image, y2 is the vertical coordinate of the second pixel point in the target image, w is the width of the original image, h is the height of the original image, and the second pixel point is the pixel point corresponding to the first pixel point after the first change.

在本申请实施例中,若原始图像为不规则图案,当屏幕的方向发生第一变化时,无论该第一变化的具体情况是什么(比如,顺时针旋转90°,顺时针旋转180°,顺时针旋转270°,镜像,镜像且顺时针旋转90°,镜像且顺时针旋转180°,镜像且顺时针旋转270°,等等),都有第一转换函数与该第一变化相对应,该第一转换函数为原始图像中的像素点(即第一像素点)与目标图像中的像素点(即第二像素点)的转换关系,从而根据该第一转换函数将原始图像按照第一转换函数进行转换,即可得到目标图像,使得该目标图像写入显示驱动芯片的图像显示存储器的方向与读取的方向相同,即使屏幕的方向发生了变化,屏幕画面刷新时也不再存在画面割裂的现象,从而解决屏幕旋转导致屏幕在刷新画面时存在画面割裂的问题。In an embodiment of the present application, if the original image is an irregular pattern, when the direction of the screen undergoes a first change, no matter what the specific situation of the first change is (for example, clockwise rotation of 90°, clockwise rotation of 180°, clockwise rotation of 270°, mirroring, mirroring and clockwise rotation of 90°, mirroring and clockwise rotation of 180°, mirroring and clockwise rotation of 270°, etc.), there is a first conversion function corresponding to the first change, and the first conversion function is a conversion relationship between a pixel point in the original image (i.e., a first pixel point) and a pixel point in the target image (i.e., a second pixel point), so that the original image is converted according to the first conversion function according to the first conversion function to obtain the target image, so that the direction in which the target image is written to the image display memory of the display driver chip is the same as the direction in which it is read, and even if the direction of the screen changes, there is no longer a phenomenon of screen fragmentation when the screen is refreshed, thereby solving the problem of screen fragmentation when the screen is refreshed due to screen rotation.

可选的,其具体实现方式可以如下:Optionally, the specific implementation method may be as follows:

获取原始图像中的第一像素点和目标图像中的第二像素点,第二像素点为第一像素点随原始图像经过方向变化后对应的像素点;Obtain a first pixel point in the original image and a second pixel point in the target image, where the second pixel point is a pixel point corresponding to the first pixel point after the direction of the original image changes;

基于第一像素点和第二像素点,确定坐标转换关系。A coordinate transformation relationship is determined based on the first pixel point and the second pixel point.

可以理解的是,根据屏幕的方向变化,对原始图像上的像素点进行相同方向的变化,得到目标图像上对应的像素点,并基于方向变化前后的像素点,确定坐标转换关系。比如,获取原始图像中的第一像素点,以及获取第一像素点随原始图像经过方向变化后得到的目标图像中对应的第二像素点,并基于第一像素点和第二像素点,确定坐标转换关系。通过本申请实施例,可以确定目标图像对应的图像数据。It is understandable that, according to the change in the direction of the screen, the pixel points on the original image are changed in the same direction to obtain the corresponding pixel points on the target image, and the coordinate transformation relationship is determined based on the pixel points before and after the direction change. For example, the first pixel point in the original image is obtained, and the corresponding second pixel point in the target image obtained after the first pixel point changes with the original image is obtained, and the coordinate transformation relationship is determined based on the first pixel point and the second pixel point. Through the embodiment of the present application, the image data corresponding to the target image can be determined.

可以理解的是,图案的旋转,只是图案的所有像素点根据图案自身的长、高进行旋转,与屏无关,可直接求得旋转后图案与转换前图案的对应关系。It can be understood that the rotation of the pattern is just the rotation of all the pixels of the pattern according to the length and height of the pattern itself, which has nothing to do with the screen. The corresponding relationship between the rotated pattern and the pattern before the rotation can be directly obtained.

首先,原始图案中的某个像素点的坐标,求其对应到图案旋转后的像素点的坐标,便可获得旋转前后像素点的对应关系。之后,对原始图案所有像素点逐一遍历进行转换,即可得到旋转后新的图案。First, the coordinates of a pixel in the original pattern are calculated to correspond to the coordinates of the pixel after the pattern is rotated, so that the correspondence between the pixels before and after the rotation can be obtained. After that, all the pixels of the original pattern are converted one by one to obtain the new pattern after the rotation.

具体可参阅图8,图8为本申请实施例提供的显示图像方向变化的流程示意图。Please refer to FIG. 8 for details, which is a schematic diagram of a flow chart of displaying image direction changes provided in an embodiment of the present application.

如图8所示,为图像的旋转算法。首先设图像起始坐标为(0,0),当纵坐标不小于图像高度时,表示整幅图像所有像素点转换完成,当纵坐标小于图像高度时,使横坐标x从0开始逐一遍历像素点进行转换,当横坐标x不小于图像宽度时,使纵坐标加1,再次使横坐标x从0开始逐一遍历像素点进行转换,直至遍历完成整幅图像的像素点进行转换,即可得到旋转后新的图案。As shown in Figure 8, it is the rotation algorithm of the image. First, the starting coordinates of the image are set to (0, 0). When the ordinate is not less than the image height, it means that all the pixels of the entire image have been converted. When the ordinate is less than the image height, the horizontal coordinate x is made to start from 0 and traverse the pixels one by one for conversion. When the horizontal coordinate x is not less than the image width, the ordinate is increased by 1, and the horizontal coordinate x is made to start from 0 and traverse the pixels one by one for conversion again, until the pixels of the entire image are traversed and converted, and the new pattern after rotation can be obtained.

下面结合表三以及图9A至图9H对图像的方向变化进一步说明。The following further describes the change in the direction of the image in conjunction with Table 3 and FIGS. 9A to 9H .

其中,旋转后新的图像中某个像素点旋转后的坐标(x2,y2)与旋转前坐标(x1,y1)之间的对应关系如下表三所示,其中,w和h为分别为图像的宽和高。The corresponding relationship between the coordinates (x 2 , y 2 ) of a pixel point in the rotated new image and the coordinates (x 1 , y 1 ) before rotation is shown in Table 3 below, where w and h are the width and height of the image, respectively.

表三Table 3

应理解,上述实施例一至实施例四,以及表一至表三,仅作为几种可能的实施例性说明,不应以此对本申请实施例构成限定,基于上述实施例和方向变化的合理变形或补充所得到的实施例,均属于本申请实施例保护的范围。It should be understood that the above-mentioned embodiments 1 to 4, as well as Tables 1 to 3, are merely illustrations of several possible embodiments and should not be used to limit the embodiments of the present application. Embodiments obtained by reasonable deformation or supplementation based on the above-mentioned embodiments and directional changes all fall within the scope of protection of the embodiments of the present application.

根据本申请实施例提供的方法,本申请实施例还提供一种电子设备,该电子设备包括存储器和处理器,该存储器存储有计算机程序,该处理器执行计算机程序时实现上述图5所示的方法。According to the method provided in an embodiment of the present application, an embodiment of the present application also provides an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the method shown in Figure 5 when executing the computer program.

根据本申请实施例提供的方法,本申请实施例还提供一种计算机可读存储介质,上述计算机可读存储介质中存储有计算机程序,当上述计算机程序在一个或多个处理器上运行时,可以实现上述图5所示的方法。According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program runs on one or more processors, the method shown in Figure 5 can be implemented.

根据本申请实施例提供的方法,本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括计算机程序,当上述计算机程序在处理器上运行时,可以实现上述图5所示的方法。According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer program product, and the above-mentioned computer program product includes a computer program. When the above-mentioned computer program runs on a processor, the method shown in the above-mentioned Figure 5 can be implemented.

本申请实施例还提供了一种显示系统,该显示系统包括:依次通信连接的主机、显示驱动芯片及屏幕;The embodiment of the present application also provides a display system, which includes: a host, a display driver chip and a screen that are communicatively connected in sequence;

在屏幕的方向发生第一变化时,主机用于获取与第一变化对应的第一转换函数,并将原始图像按照第一转换函数进行转换,得到目标图像;When the direction of the screen undergoes a first change, the host is used to obtain a first conversion function corresponding to the first change, and convert the original image according to the first conversion function to obtain a target image;

主机还用于将目标图像写入显示驱动芯片的图像显示存储器;The host is also used to write the target image into the image display memory of the display driver chip;

显示驱动芯片用于读取图像显示存储器的目标图像,并将其通过屏幕进行显示;The display driver chip is used to read the target image from the image display memory and display it on the screen;

屏幕用于显示目标图像。The screen is used to display the target image.

可选的,第一变化及其对应的第一转换函数,可以如上述图5任一实施例中的方法,此处不再赘述。Optionally, the first change and its corresponding first conversion function may be implemented as in any of the embodiments in FIG. 5 , which will not be described in detail here.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序相关的硬件完成,该计算机程序可存储于计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:只读存储器ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储计算机程序代码的介质。A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by hardware related to a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: a read-only memory ROM or a random access memory RAM, a magnetic disk or an optical disk, and other media that can store computer program codes.

Claims (8)

1. The display method is characterized by applying a display system, wherein the display system comprises a host, a display driving chip and a screen which are sequentially in communication connection, and the display method comprises the following steps:
when the direction of the screen is changed for the first time, the host acquires a first conversion function corresponding to the first change, and converts an original image according to the first conversion function to obtain a target image;
The host writes the target image into an image display memory of the display driving chip;
and the display driving chip reads the target image of the image display memory and displays the target image through the screen.
2. The method of claim 1, wherein if the original image is a coordinate point, the first transformation is rotated 90 ° clockwise, and the first transformation function corresponds to x 1 =y 2 ,y 1 =lcd_h-1-x 2
Alternatively, the first transformation is rotated 180 ° clockwise, and the first transformation function corresponds to x 1 =lcd_w-1-x 2 ,y 1 =lcd_h-1-y 2
Alternatively, the first variation is a 270 ° clockwise rotation, the first transfer function corresponding to: x is x 1 =lcd_w-1-y 2 ,y 1 =x 2
Alternatively, the first change is a mirror image, the first rotationThe trade function corresponds to: x is x 1 =x 2 ,y 1 =lcd_h-1-y 2
Alternatively, the first variation is mirrored and rotated 90 ° clockwise, the first transfer function corresponding to: x is x 1 =y 2 ,y 1 =x 2
Alternatively, the first variation is mirrored and rotated 180 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-1-x 2 ,y 1 =y 2
Alternatively, the first variation is mirrored and rotated 270 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-1-y 2 ,y 1 =lcd_h-1-x 2
Wherein said x 1 The y is the abscissa of the first coordinate point in the original image 1 The x is the ordinate of the first coordinate point in the original image 2 The y is the abscissa of the second coordinate point in the target image 2 And taking the lcd_w as the ordinate of a second coordinate point in the target image, wherein lcd_w is the width of the resolution of the screen, lcd_h is the height of the resolution of the screen, and the second coordinate point is the coordinate point corresponding to the first coordinate point after the first change.
3. The method of claim 1, wherein if the original image is a line segment, the first transformation is rotated 90 ° clockwise, and the first transformation function corresponds to: x is x 1 =y 2 ,y 1 =lcd_h-1-x 2
Alternatively, the first variation is rotated 180 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-1-x 2 ,y 1 =lcd_h-1-y 2
Alternatively, the first variation is a 270 ° clockwise rotation, the first transfer function corresponding to: x is x 1 =lcd_w-1-y 2 ,y 1 =x 2
Alternatively, the first variation is a mirror image, the firstThe transfer function corresponds to: x is x 1 =x 2 ,y 1 =lcd_h-1-y 2
Alternatively, the first variation is mirrored and rotated 90 ° clockwise, the first transfer function corresponding to: x is x 1 =y 2 ,y 1 =x 2
Alternatively, the first variation is mirrored and rotated 180 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-1-x 2 ,y 1 =y 2
Alternatively, the first variation is mirrored and rotated 270 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-1-y 2 ,y 1 =lcd_h-1-x 2
Wherein said x 1 Is the abscissa of the first coordinate point on the first line segment in the original image, the y 1 Is the ordinate of a first coordinate point on a first line segment in the original image, the x 2 Is the abscissa of a second coordinate point on a second line segment in the target image, the y 2 And the lcd_w is the width of the resolution of the screen, the lcd_h is the high of the resolution of the screen, the second line segment is the line segment corresponding to the first line segment after the first change, and the second coordinate point on the second line segment is the coordinate point corresponding to the first coordinate point on the first line segment after the first change.
4. The method of claim 1, wherein if the original image is a rectangular window, the first transformation is rotated 90 ° clockwise, and the first transformation function corresponds to: x is x 1 =y 2 ,y 1 =lcd_h-x 2 -w 2 ,w 1 =h 2 ,h 1 =w 2
Alternatively, the first variation is rotated 180 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-x 2 -w 2 ,y 1 =lcd_h-y 2 -h 2 ,w 1 =w 2 ,h 1 =h 2
Alternatively, the first variation is a 270 ° clockwise rotation, the first transfer function corresponding to: x is x 1 =lcd_w-y 2 -h 2 ,y 1 =x 2 ,w 1 =h 2 ,h 1 =w 2
Alternatively, the first change is a mirror image, the first transfer function corresponding to: x is x 1 =x 2 ,y 1 =lcd_h-y 2 -h 2 ,w 1 =w 2 ,h 1 =h 2
Alternatively, the first variation is mirrored and rotated 90 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-y 2 -h 2 ,y 1 =lcd_h-x 2 -w 2 ,w 1 =h 2 ,h 1 =w 2
Alternatively, the first variation is mirrored and rotated 180 ° clockwise, the first transfer function corresponding to: x is x 1 =lcd_w-x 2 -w 2 ,y 1 =y 2 ,w 1 =w 2 ,h 1 =h 2
Alternatively, the first variation is mirrored and rotated 270 ° clockwise, the first transfer function corresponding to: x is x 1 =y 2 ,y 1 =x 2 ,w 1 =h 2 ,h 1 =w 2
Wherein said x 1 The y is the abscissa of the first coordinate point on the first window in the original image 1 The x is the ordinate of the first coordinate point on the first window in the original image 2 Is the abscissa of a second coordinate point on a second window in the target image, the y 2 The w is the ordinate of a second coordinate point on a second window in the target image 1 For the width of the first window, the h 1 For the height of the first window, the w 2 For the width of the second window, the h 2 Is the firstAnd the second window is a window corresponding to the first window after the first change, and the second coordinate point on the second window is a coordinate point corresponding to the first coordinate point on the first window after the first change.
5. The method of claim 1, wherein if the original image is an irregular pattern, the first transformation is rotated 90 ° clockwise, and the first transformation function corresponds to: x is x 2 =h-1-y 1 ,y 2 =x 1
Alternatively, the first variation is rotated 180 ° clockwise, the first transfer function corresponding to: x is x 2 =w-1-x 1 ,y 2 =h-1-y 1
Alternatively, the first variation is a 270 ° clockwise rotation, the first transfer function corresponding to: x is x 2 =y 1 ,y 2 =w-1-x 1
Alternatively, the first change is a mirror image, the first transfer function corresponding to: x is x 2 =x 1 ,y 2 =h-1-y 1
Alternatively, the first variation is mirrored and rotated 90 ° clockwise, the first transfer function corresponding to: x is x 2 =y 1 ,y 2 =x 1
Alternatively, the first variation is mirrored and rotated 180 ° clockwise, the first transfer function corresponding to: x is x 2 =w-1-x 1 ,y 2 =y 1
Alternatively, the first variation is mirrored and rotated 270 ° clockwise, the first transfer function corresponding to: x is x 2 =h-1-y 1 ,y 2 =w-1-x 1
Wherein said x 1 The y is the abscissa of the first pixel point in the original image 1 The x is the ordinate of the first pixel point in the original image 2 For the object ofThe abscissa of the second pixel point in the image, said y 2 And the second pixel point is a pixel point corresponding to the first pixel point after the first change.
6. An electronic device comprising a memory storing a computer program and a processor implementing the method of any one of claims 1 to 5 when the computer program is executed by the processor.
7. A computer readable storage medium for storing instructions or a computer program; the method of any of claims 1 to 5 is implemented when said instructions or said computer program are executed.
8. A display system, comprising: the host, the display driving chip and the screen are sequentially connected in a communication way;
when the direction of the screen is changed for the first time, the host is used for acquiring a first conversion function corresponding to the first change, and converting an original image according to the first conversion function to obtain a target image;
the host is also used for writing the target image into an image display memory of the display driving chip;
the display driving chip is used for reading the target image of the image display memory and displaying the target image through the screen;
the screen is used for displaying the target image.
CN202311051629.4A 2023-08-18 2023-08-18 A display method and related device Pending CN117008861A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202311051629.4A CN117008861A (en) 2023-08-18 2023-08-18 A display method and related device
PCT/CN2024/093794 WO2025039633A1 (en) 2023-08-18 2024-05-17 Display method and related apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311051629.4A CN117008861A (en) 2023-08-18 2023-08-18 A display method and related device

Publications (1)

Publication Number Publication Date
CN117008861A true CN117008861A (en) 2023-11-07

Family

ID=88565474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311051629.4A Pending CN117008861A (en) 2023-08-18 2023-08-18 A display method and related device

Country Status (2)

Country Link
CN (1) CN117008861A (en)
WO (1) WO2025039633A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025039633A1 (en) * 2023-08-18 2025-02-27 深圳市广和通无线通信软件有限公司 Display method and related apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004240878A (en) * 2003-02-07 2004-08-26 Nec Corp Portable electronic appliance, display direction switching method and program
CN103366705B (en) * 2013-07-16 2015-07-08 苏州佳世达电通有限公司 Screen adjustment method and system for a liquid crystal display
US11776510B2 (en) * 2019-09-17 2023-10-03 Sitronix Technology Corp. Image update method for a display device and driving device thereof
CN113281983B (en) * 2021-04-21 2022-06-17 广东瑞芯智能科技有限公司 Control method, system, smart watch and medium for smart watch screen display
US11705082B1 (en) * 2021-09-14 2023-07-18 Fitbit Llc Method for reducing or eliminating tearing effect of an image on a display of wearable computing device
CN117008861A (en) * 2023-08-18 2023-11-07 深圳市广和通无线通信软件有限公司 A display method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2025039633A1 (en) * 2023-08-18 2025-02-27 深圳市广和通无线通信软件有限公司 Display method and related apparatus

Also Published As

Publication number Publication date
WO2025039633A1 (en) 2025-02-27

Similar Documents

Publication Publication Date Title
US5299309A (en) Fast graphics control system capable of simultaneously storing and executing graphics commands
CN106128357B (en) Display driver and method of driving display panel
CN103455292B (en) Business datum display processing method and device, subscriber equipment
TWI594220B (en) Display driver integrated circuit, a display system having the same, and a display data processing method therof
JP2016091543A (en) Rendering method, rendering apparatus, and electronic apparatus
JPS58209784A (en) Memory system
TWI651699B (en) Display driver integrated circuit (IC), method of operating the same, and device comprising the same
CN105898157B (en) A scaler circuit for generating images of various resolutions from a single image and devices incorporating the same
CN106293585B (en) A kind of cache processing method and device for mobile terminal display
WO2025039633A1 (en) Display method and related apparatus
JP3568555B2 (en) Display device
CN104685543B (en) Graphics rendering apparatus
CN109685715B (en) Stepless rotation processing method for high-precision image in display system
KASAI et al. Digital Packet Video Link for super high resolution display
JP2006301724A (en) Memory controller, image processing controller, and electronic device
JPH0934411A (en) Image display device and liquid crystal display controller
CN212135115U (en) A signal conversion system for ink screen mobile phone
CN113689448A (en) Sobel + EWma edge detection system and method based on FPGA
JP4313527B2 (en) Image drawing device
JP2005122119A (en) Video interface device in system constituted of mpu and video codec
JP3297475B2 (en) Display control device and method
TWI386895B (en) Accelerating device and method for lcd and controller thereof
JP2006227498A (en) Image processing system
CN116567352A (en) Image processing method, device, equipment, storage medium and program product
JPS59136783A (en) Multiwindow bit map display unit

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination