Display device and image display method

By using edge detection and affine transformation matrices, the tilt angle of images in the display device is automatically corrected, solving the problem of inconvenient viewing caused by file tilt and improving operational convenience.

CN116954536BActive Publication Date: 2026-05-01HISENSE COMML DISPLAY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HISENSE COMML DISPLAY CO LTD
Filing Date
2022-04-20
Publication Date
2026-05-01

Smart Images

  • Figure CN116954536B_ABST
    Figure CN116954536B_ABST
Patent Text Reader

Abstract

This application provides a display device and an image display method. The display device includes a controller and a display connected to the controller. The controller is configured to: acquire an image to be processed; perform edge detection on the image to be processed; obtain multiple target vectors in a first coordinate system; select a first direction vector and a second direction vector from the multiple target vectors based on the lengths of the multiple target vectors, wherein the angle between the first direction vector and the second direction vector is within a preset range; establish a second coordinate system based on the first direction vector and the second direction vector and calculate the affine transformation matrix between the first coordinate system and the second coordinate system; rotate and translate the image to be processed based on the affine transformation matrix to obtain a target image; and send the target image to the display for display. The display device provided in this embodiment realizes automatic correction of the tilt angle of the image to be processed, improving the convenience of operation of the display device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of display technology, and in particular to a display device and an image display method. Background Technology

[0002] With the development of display technology, the application scope of display devices is becoming wider and wider. For example, display devices can be used in teaching and meetings to display documents.

[0003] In related technologies, when it is necessary to display a document, the document can be placed in front of a camera so that the camera can capture an image of the document and display it on the screen of a display device for other users to view.

[0004] However, in the process of developing this application, the inventors discovered at least the following problems in the related technology: when the document is tilted, the image of the document will also be displayed on the screen at the same tilt angle, affecting the user's viewing experience. In this case, the user needs to manually adjust the document, which is cumbersome and inconvenient. Summary of the Invention

[0005] This application provides a display device and an image display method to automatically correct the tilt angle of an image and improve the ease of operation of the display device.

[0006] In a first aspect, embodiments of this application provide a display device, including:

[0007] Acquire the image to be processed; the image to be processed includes the target content;

[0008] Edge detection is performed on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system. Based on the length of the multiple target vectors, a first direction vector and a second direction vector are selected from the multiple target vectors. The angle between the first direction vector and the second direction vector is within a preset range.

[0009] Based on the first direction vector and the second direction quantity, a second coordinate system is established, and the affine transformation matrix between the first coordinate system and the second coordinate system is calculated.

[0010] Based on the affine transformation matrix, the image to be processed is rotated and translated to obtain the target image, and the target image is sent to the display.

[0011] The display, connected to the controller, is used to display the target image.

[0012] In one possible design, when the controller performs edge detection on the image to be processed and obtains target vectors corresponding to multiple edges in the first coordinate system, it is specifically used for:

[0013] Based on the corner extraction algorithm, corner points are extracted from the image to be processed to obtain multiple corner points;

[0014] Line transformation is performed on multiple corner points to obtain target vectors corresponding to multiple edges in the first coordinate system.

[0015] In one possible design, when the controller selects a first direction vector and a second direction vector from a plurality of target vectors based on the lengths of the target vectors, it is specifically used for:

[0016] Based on the directions of the multiple target vectors, the multiple target vectors are divided into multiple directional ranges;

[0017] For each directional range, calculate the sum of the lengths of the target vectors within that directional range;

[0018] Based on the sum of the multiple lengths, a first directional range and a second directional range are selected from the multiple directional ranges;

[0019] A first direction vector is selected from the target vectors within the first direction range, and a second direction vector is selected from the target vectors within the second direction range.

[0020] In one possible design, when the controller selects a first directional range and a second directional range from a plurality of directional ranges based on a plurality of lengths, it is specifically configured to:

[0021] The directional range corresponding to the maximum value among the multiple lengths is determined as the first directional range;

[0022] Determine at least one directional range whose angle with the first directional range is within a preset range;

[0023] The first direction range is defined as the direction range with the longest length and the largest length among the at least one direction range.

[0024] In one possible design, when the controller selects a first direction vector from the target vectors within the first direction range, it specifically performs the following:

[0025] Using the length of each target vector within the first direction range as the weight, calculate the weighted direction within the first direction range;

[0026] Calculate the direction difference between the weighted direction and the direction of each target vector within the first direction range;

[0027] The target vector corresponding to the minimum value among the multiple directional differences is determined as the first directional vector.

[0028] In one possible design, when the controller calculates the weighted direction of the first directional range using the lengths of each target vector within the first directional range as weights, it is specifically used for:

[0029] Calculate the sum of the products of the length and direction of each target vector within the first direction range;

[0030] The ratio between the sum of the products and the sum of the lengths of the target vectors within the first direction range is determined as the weighted direction of the first direction range.

[0031] In one possible design, when the controller establishes a second coordinate system based on the first direction vector and the second direction quantity, it is specifically used for:

[0032] The intersection of the first direction vector and the second direction vector is defined as the origin of the second coordinate system;

[0033] Establish the first number line of the second coordinate system on the straight line containing the first direction vector;

[0034] Establish the second number line of the second coordinate system on the straight line containing the second direction vector.

[0035] In one possible design, the controller is also configured to:

[0036] Determine the maximum bounding box of the target content in the target image;

[0037] If the maximum outer frame is larger than the preset display size, the target image is reduced in size to obtain a reduced target image, so that the display shows the reduced target image;

[0038] If the maximum outer frame is smaller than the preset display size and the center of the maximum outer frame does not coincide with the center of the display interface of the monitor, the target display image is translated until the center of the maximum outer frame coincides with the center of the display interface of the monitor to obtain the translated image, so that the monitor displays the translated image.

[0039] In one possible design, when determining the maximum bounding box of the target content in the target image, the controller is specifically used for:

[0040] A traversal search is performed from the edge of the display interface towards the center to determine the maximum bounding box of the target content in the target image.

[0041] In one possible design, the controller is also configured to:

[0042] The image to be processed is reduced in size based on a preset factor to obtain a reduced image to be processed.

[0043] Accordingly, when the controller performs edge detection on the image to be processed, it is specifically used to perform edge detection on the scaled-down image to be processed.

[0044] When the controller rotates and translates the image to be processed based on the affine transformation matrix to obtain the target image, it is specifically used to: adjust the affine transformation matrix based on the preset multiple to obtain the adjusted affine transformation matrix, and rotate and translate the image to be processed based on the adjusted affine transformation matrix to obtain the target image.

[0045] In one possible design, the controller is also configured to:

[0046] Perform text detection on the target image to obtain the first number of characters;

[0047] The target image is rotated at least once by a preset angle, and text detection is performed on the target image after each rotation to obtain the corresponding second number of characters;

[0048] The image corresponding to the largest of the first number of characters and at least one of the second number of characters is sent to the display so that the display shows the image corresponding to the largest number of characters.

[0049] Secondly, embodiments of this application provide an image display method, including:

[0050] Acquire the image to be processed; the image to be processed includes the target content;

[0051] Edge detection is performed on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system. Based on the length of the multiple target vectors, a first direction vector and a second direction vector are selected from the multiple target vectors. The angle between the first direction vector and the second direction vector is within a preset range.

[0052] Based on the first direction vector and the second direction quantity, a second coordinate system is established, and the affine transformation matrix between the first coordinate system and the second coordinate system is calculated.

[0053] Based on the affine transformation matrix, the image to be processed is rotated and translated to obtain the target image, and the target image is sent to the display for display.

[0054] The display device and image display method provided in this embodiment include a controller configured to: acquire an image to be processed; the image to be processed includes target content; perform edge detection on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system; select a first direction vector and a second direction vector from the multiple target vectors based on their lengths, wherein the angle between the first direction vector and the second direction vector is within a preset range; establish a second coordinate system based on the first direction vector and the second direction vector; calculate the affine transformation matrix between the first coordinate system and the second coordinate system; rotate and translate the image to be processed based on the affine transformation matrix to obtain a target image; and send the target image to a display, wherein the display is connected to the controller for displaying the target image. The display device provided in this embodiment, by performing edge detection on the acquired image to be processed to obtain target vectors in a first coordinate system, establishing a second coordinate system based on the target vectors, calculating the affine transformation matrix between the two coordinate systems, and then rotating and translating the image using the affine transformation matrix, achieves automatic correction of the tilt angle of the image to be processed, improving the ease of operation of the display device. Attached Figure Description

[0055] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0056] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of this application;

[0057] Figure 2 An exemplary block diagram of the configuration of the control device 100 according to an exemplary embodiment is shown;

[0058] Figure 3 An exemplary block diagram of the hardware configuration of the display device 200 according to an exemplary embodiment is shown;

[0059] Figure 4 This is a schematic diagram of the software configuration in a display device 200 according to one or more embodiments of this application;

[0060] Figure 5 This is a schematic diagram showing the icon control interface of an application in a display device 200 according to one or more embodiments of this application;

[0061] Figure 6This is a hardware configuration block diagram of a display device 200 according to one or more embodiments of this application;

[0062] Figure 7 This is an application scenario diagram of a display device 200 according to one or more embodiments of this application;

[0063] Figure 8 This is a schematic diagram illustrating the principle of edge detection of an image to be processed by a display device 200 according to one or more embodiments of this application;

[0064] Figure 9 This is a schematic diagram illustrating the principle of a display device 200 according to one or more embodiments of this application searching for a region of image content of a target image;

[0065] Figure 10 A schematic diagram of a display device 200 displaying a target image according to one or more embodiments of this application;

[0066] Figure 11 This is a flowchart illustrating an image display method according to one or more embodiments of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0068] Based on the exemplary embodiments described in this application, all other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of the appended claims. Furthermore, although the disclosures in this application are presented by way of one or more exemplary examples, it should be understood that each aspect of these disclosures can also constitute a complete implementation on its own.

[0069] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0070] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities and do not necessarily imply a specific order or sequence, unless otherwise indicated. It should be understood that such terms can be used interchangeably where appropriate, for example, to implement the application in a sequence other than those given in the embodiments illustrated or described herein.

[0071] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclusively include, for example, a product or device that includes a series of components is not necessarily limited to those that are explicitly listed, but may include other components that are not explicitly listed or that are inherent to such product or device.

[0072] As used in this application, the term "module" means any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code capable of performing the functions associated with that element.

[0073] As used in this application, the term "remote control" refers to a component of an electronic device (such as the display device disclosed in this application) that typically allows for wireless control of the electronic device over a short distance. It generally uses infrared and / or radio frequency (RF) signals and / or Bluetooth to connect to the electronic device, and may also include functional modules such as WiFi, wireless USB, Bluetooth, and motion sensors. For example, a handheld touch remote control replaces most of the physical built-in hard buttons in a typical remote control device with a user interface on a touchscreen.

[0074] As used in this application, the term "gesture" refers to user behavior in which a user expresses an expected idea, action, purpose, and / or result through a change in hand shape or hand movement.

[0075] Figure 1 This is a schematic diagram illustrating an operational scenario between a display device and a control device according to one or more embodiments of this application, such as... Figure 1 As shown, a user can operate the display device 200 via a mobile terminal 300 and a control device 100. The control device 100 can be a remote control, and communication between the remote control and the display device includes infrared protocol communication, Bluetooth protocol communication, wireless or other wired methods to control the display device 200. The user can input user commands through buttons on the remote control, voice input, control panel input, etc., to control the display device 200. In some embodiments, a mobile terminal, tablet computer, computer, laptop computer, and other smart devices can also be used to control the display device 200.

[0076] In some embodiments, the mobile terminal 300 can install software applications with the display device 200 to achieve connection and communication via network communication protocols, enabling one-to-one control operations and data communication. Audio and video content displayed on the mobile terminal 300 can also be transmitted to the display device 200 for synchronous display. The display device 200 also communicates with the server 400 via various communication methods. The display device 200 can communicate via a local area network (LAN), wireless local area network (WLAN), and other networks. The server 400 can provide various content and interactive features to the display device 200. The display device 200 can be a liquid crystal display, an OLED display, or a projection display device. In addition to providing broadcast television reception functions, the display device 200 can also be equipped with a smart network television function that provides computer support.

[0077] Figure 2 An exemplary block diagram of the configuration of the control device 100 according to an exemplary embodiment is shown. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive user input commands and convert them into commands that the display device 200 can recognize and respond to, acting as an intermediary for interaction between the user and the display device 200. The communication interface 130 is used for external communication and includes at least one of a Wi-Fi chip, a Bluetooth module, NFC, or a replacement module. The user input / output interface 140 includes at least one of a microphone, a touchpad, a sensor, buttons, or a replacement module.

[0078] Figure 3 An exemplary block diagram of the hardware configuration of the display device 200 according to an exemplary embodiment is shown. Figure 3The display device 200 shown includes at least one of the following: a tuner / demodulator 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface 280. The controller includes a central processing unit, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first to nth interface for input / output. The display 260 can be at least one of a liquid crystal display, an OLED display, a touch display, and a projection display, and can also be a projection device and a projection screen. The tuner / demodulator 210 receives broadcast television signals via wired or wireless reception and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals. The detector 230 is used to collect signals from the external environment or signals interacting with the external environment. The controller 250 and the tuner / demodulator 210 can be located in different separate devices; that is, the tuner / demodulator 210 can also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0079] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. The user can input user commands through a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input commands through the GUI. Alternatively, the user can input user commands by inputting specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.

[0080] In some embodiments, a "user interface" is the medium through which an application or operating system interacts and exchanges information with a user, enabling the conversion between the internal form of information and a form acceptable to the user. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include at least one of the visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.

[0081] Figure 4 This is a schematic diagram of the software configuration in a display device 200 according to one or more embodiments of this application, such as... Figure 4As shown, the system is divided into four layers, from top to bottom: the Applications layer (referred to as the "Application Layer"), the Application Framework layer (referred to as the "Framework Layer"), the Android runtime and system library layer (referred to as the "System Runtime Layer"), and the kernel layer. The kernel layer contains at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, Wi-Fi driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.

[0082] Figure 5 This is a schematic diagram showing the icon control interface of an application in a display device 200 according to one or more embodiments of this application, such as... Figure 5 As shown, the application layer contains at least one application whose corresponding icon control can be displayed on the screen, such as: live TV application icon control, video-on-demand application icon control, media center application icon control, application center icon control, game application icon control, etc. Live TV applications can provide live television from different signal sources. Video-on-demand applications can provide video from different storage sources. Unlike live TV applications, video-on-demand provides video display from certain storage sources. Media center applications can provide applications for playing various multimedia content. The application center can provide storage for various applications.

[0083] In some embodiments, Figure 3 Based on the hardware configuration block diagram of the display device 200 shown, as follows: Figure 6 As shown, the image acquisition device of detector 230 can be a high-speed document scanner 2301, and the display 260 can include a smart blackboard 2601. The high-speed document scanner 2302 is used to capture images of the documents to be displayed, obtain images to be processed, and send the processed images to controller 250. Controller 250 then sends the processed images to smart blackboard 2601 for display. In the specific implementation process, as... Figure 7As shown, when a document needs to be displayed, the user can place the document under the document scanner 2301 so that the scanner can capture the document and obtain the corresponding image to be processed. The image is then sent to the controller 250, which in turn sends it to the smart blackboard 2601 for display by other users. However, if the document is tilted when placed under the scanner, the resulting image will also be tilted at the same angle, causing the content to appear skewed and affecting the user's viewing experience. In this case, the user needs to manually adjust the orientation of the document, a cumbersome and inconvenient process.

[0084] To solve the above-mentioned technical problems, the inventors of this application have discovered that the controller 250 can find the target vector corresponding to the adjacent edge of the target content in the image to be processed in the first coordinate system, establish a second coordinate system based on the target vector, calculate the affine transformation matrix between the two coordinate systems, and then rotate and translate the image through the affine transformation matrix for display, thereby realizing the automatic correction of the tilt angle of the image to be processed and improving the convenience of operation of the display device.

[0085] The technical solutions of this application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0086] The display device provided in this application embodiment may include: a controller configured to: acquire an image to be processed; the image to be processed includes target content; perform edge detection on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system, and select a first direction vector and a second direction vector from the multiple target vectors based on the length of the multiple target vectors; the angle between the first direction vector and the second direction vector is within a preset range; establish a second coordinate system according to the first direction vector and the second direction vector, and calculate the affine transformation matrix between the first coordinate system and the second coordinate system; rotate and translate the image to be processed based on the affine transformation matrix to obtain a target image, and send the target image to a display; the display is connected to the controller and configured to display the target image.

[0087] In this embodiment, the controller acquires the image to be processed, which can be an image acquisition device through a display device, for example... Figure 6The document scanner 2301 shown is used to capture images corresponding to the documents to be displayed. Images can also be acquired through a data interface, communication module, or external device interface. Regardless of the acquisition method, the tilt angle of the image can be automatically corrected using the method described in this solution.

[0088] In some embodiments, to reduce computational load, the image to be processed can be reduced in size before tilting it. The controller is further configured to: reduce the image to be processed by a preset factor to obtain a reduced image; correspondingly, when performing edge detection on the image to be processed, the controller is specifically configured to perform edge detection on the reduced image; when rotating and translating the image to be processed based on the affine transformation matrix to obtain a target image, the controller is specifically configured to: adjust the affine transformation matrix based on the preset factor to obtain an adjusted affine transformation matrix, and rotate and translate the image to be processed based on the adjusted affine transformation matrix to obtain the target image.

[0089] For example, taking a display resolution of 1920*1080 as an example, the image to be processed can be reduced by a factor of 4, to 480*270. Of course, the reduction factor can be determined according to actual needs, and this embodiment does not limit it.

[0090] In some embodiments, when the controller performs edge detection on the image to be processed to obtain target vectors corresponding to multiple edges in the first coordinate system, it is specifically used to: extract corners from the image to be processed based on a corner extraction algorithm to obtain multiple corners; and perform line transformation processing on the multiple corners to obtain target vectors corresponding to multiple edges in the first coordinate system.

[0091] Specifically, the image to be processed can be converted to grayscale, and then corner points can be extracted based on the obtained grayscale image using a corner extraction algorithm. The corner extraction algorithm can employ algorithms such as the Harris operator, Moravec operator, and Forstnes operator; this embodiment does not limit the specific algorithm used. When performing transformation processing on multiple corner points, the Hough line transform algorithm can be used, and the specific algorithm can be adjusted according to actual needs; this embodiment does not limit the specific algorithm used.

[0092] For example, such as Figure 8 As shown, after corner point extraction and line transformation, the grayscale image of the image to be processed above the arrow can obtain multiple target vectors corresponding to multiple edges in the first coordinate system (origin is O1), as shown below the arrow.

[0093] In some embodiments, there are multiple methods for selecting the first direction vector and the second direction vector. In one feasible approach, for a document with relatively neat edges, such as a single sheet of paper, the multiple target vectors obtained by detection can be sorted based on their lengths, and the target vector with the longest length can be selected as the first direction vector. Then, for the other target vectors, the target vector whose angle with the first direction vector meets a preset range can be found in descending order of length and selected as the second direction vector.

[0094] For example, in the sorting based on length, the first target vector is 5 (angle 45 degrees), the second is 4 (angle 48 degrees), and the third is 1 (angle 140 degrees). Assuming the preset angle range is 60 to 110 degrees, after determining the first target vector 5 as the first direction vector, the angle between the second target vector 4 and target vector 5 is calculated to be 3 degrees, which clearly does not meet the preset range requirement. Therefore, the angle between the third target vector 1 and target vector 5 is calculated to be 95 degrees, which meets the preset range requirement. Thus, target vector 1 can be determined as the second direction vector.

[0095] In another possible implementation, for a document to be displayed that is an open book or a piece of paper with irregular edges, the target vectors obtained from edge detection can be grouped according to directional ranges, and a first directional vector and a second directional vector can be selected based on the sum of their lengths. Specifically, when the controller selects the first directional vector and the second directional vector from multiple target vectors based on their lengths, it can be specifically used to: divide the multiple target vectors into multiple directional ranges based on their directions; calculate the sum of the lengths of each target vector within each directional range; select a first directional range and a second directional range from the multiple directional ranges based on the sums of their lengths; select the first directional vector from the target vectors within the first directional range, and select the second directional vector from the target vectors within the second directional range.

[0096] For example, multiple target vectors can be divided into 36 directional ranges. The 36 directional ranges can be determined by dividing 180 degrees into 36 equal parts, resulting in 36 directional ranges of 5 degrees each. For example, the first directional range is (0, 5), the second is (6, 10), ..., the 35th is (170, 175), and the 36th is (176, 180). Of course, 36 is just an example; the specific number of directional ranges can be set according to actual needs, and this embodiment does not limit this. After determining the multiple directional ranges, each target vector can be calculated as follows: Assuming the coordinates of the two endpoints of the target vector in the first coordinate system are (a1, b1) and (a2, b2), then the length of the target vector is the distance between the two points, which can be obtained using the distance formula. Furthermore, the slope can be calculated, and the arctangent value of the slope can be obtained to get the angle of the target vector. Dividing the angle by 5 gives the directional range to which the target vector belongs.

[0097] / / Calculate length l

[0098] l = sqrt((a1-a2)) 2 +(b1-b2) 2 );

[0099] / / Calculate the slope k

[0100] k = (b2 - b1) / (a2 - a1);

[0101] / / Calculate angle

[0102] angle=atan(k)*180 / 3.14159265;

[0103] / / Calculate the range of the direction

[0104] dirt = angle / 5, where dirt represents the nth direction range out of 36.

[0105] Calculate the sum of lengths corresponding to each directional range, which is to add the lengths of all target vectors within a directional range to obtain the sum of lengths corresponding to that directional range.

[0106] Optionally, when the controller selects a first direction range and a second direction range from a plurality of direction ranges based on a plurality of length sums, it may specifically be used to: determine the direction range corresponding to the maximum value among the plurality of length sums as the first direction range; determine at least one direction range whose angle with the first direction range is within a preset range; and determine the direction range with the largest length sum among the at least one direction range as the second direction range.

[0107] Optionally, when the controller selects a first direction vector from the target vectors within the first direction range, it may specifically be configured to: calculate a weighted direction for the first direction range using the lengths of the target vectors within the first direction range as weights; calculate the direction differences between the weighted direction and the directions of the target vectors within the first direction range; and determine the target vector corresponding to the minimum value among the plurality of direction differences as the first direction vector. When the controller selects a second direction vector from the target vectors within the second direction range, it may specifically be configured to: calculate a weighted direction for the second direction range using the lengths of the target vectors within the second direction range as weights; calculate the direction differences between the weighted direction and the directions of the target vectors within the second direction range; and determine the target vector corresponding to the minimum value among the plurality of direction differences as the second direction vector.

[0108] Optionally, when the controller calculates the weighted direction of the first direction range using the length of each target vector within the first direction range as the weight, it can specifically be used to: calculate the sum of the product of the length and direction of each target vector within the first direction range; and determine the ratio between the sum of the product and the sum of the lengths of each target vector within the first direction range as the weighted direction of the first direction range.

[0109] In some embodiments, when the controller establishes a second coordinate system based on the first direction vector and the second direction vector, it may specifically be used to: determine the intersection point of the first direction vector and the second direction vector as the origin of the second coordinate system; establish a first number axis of the second coordinate system on the straight line where the first direction vector is located; and establish a second number axis of the second coordinate system on the straight line where the second direction vector is located.

[0110] For example, such as Figure 8 As shown, target vector 801 can be a first direction vector, and target vector 802 can be a second direction vector. The intersection point O2 of the first and second direction vectors is determined as the origin of the second coordinate system, the line containing the first direction vector is determined as the number axis x2 of the second coordinate system, and the line containing the second direction vector is determined as the number axis y2 of the second coordinate system.

[0111] In some embodiments, the affine transformation matrix between two coordinate systems can be calculated simply by knowing the coordinates of three non-collinear points in each coordinate system. In this embodiment, since the angle between the first and second direction vectors is not zero, there must be at least three non-collinear points among the endpoints of the first and second direction vectors. Therefore, the affine transformation matrix between the first and second coordinate systems can be calculated based on the first and second direction vectors. In the specific calculation process, the coordinates of the two endpoints of the first direction vector in the second coordinate system are the distances from the two endpoints to the origin O2. Similarly, the coordinates of the two endpoints of the second direction vector in the second coordinate system can also be obtained. A system of equations can then be established, and the affine transformation matrix between the first and second coordinate systems can be obtained based on this system of equations.

[0112] In some embodiments, after obtaining the target image, since the target image is obtained by rotating the image to be processed, the size of the target image may exceed the original size of the image to be processed, resulting in incomplete display. Therefore, the area range of the target content in the target image can be detected. Specifically, the controller can also be configured to: determine the maximum bounding box of the target content in the target image; if the maximum bounding box is larger than a preset display size, then reduce the size of the target image to obtain a reduced target image, so that the display can display the reduced target image; if the maximum bounding box is smaller than the preset display size and the center of the maximum bounding box does not coincide with the center of the display interface of the display, then translate the target display image until the center of the maximum bounding box coincides with the center of the display interface of the display to obtain a translated image, so that the display can display the translated image.

[0113] For example, such as Figure 9 As shown, the search can be performed on each pixel in the directions indicated by the four arrows (up, down, left, and right) to determine the maximum bounding box of the target content. After obtaining the maximum bounding box, the range corresponding to the maximum bounding box can be compared with the display size of the monitor. If it is larger, it is reduced; if it is smaller, the target content can be centered to make the target content appear larger. Figure 10 As shown, it is displayed in the center.

[0114] Optionally, when determining the maximum bounding box of the target content in the target image, the controller can specifically be used to: perform a traversal search from the edge of the display interface towards the center to determine the maximum bounding box of the target content in the target image. Furthermore, since the range covered by the multiple target vectors obtained from edge detection can be considered equivalent to the range covered by the target content, the controller can also be used to perform coordinate retrieval on each target vector after rotation and translation based on the affine transformation matrix to determine the maximum bounding box of the target content.

[0115] In some embodiments, to further ensure that the text in the target image is displayed in the correct orientation and to avoid the text being inverted or rotated 80 degrees in the target image, the controller may also be configured to: perform text detection on the target image to obtain a first number of characters; rotate the target image at least once by a preset angle, and perform text detection on the target image after each rotation to obtain a corresponding second number of characters; send the image corresponding to the largest number of characters among the first number of characters and at least one of the second number of characters to the display, so that the display displays the image corresponding to the largest number of characters.

[0116] For example, text detection can be performed on the target image first to obtain a first number of characters. Next, the target image can be rotated 80 degrees to the left, and text detection can be performed on the rotated image to obtain a second number of characters. Then, the target image can be rotated 80 degrees to the right, and text detection can be performed on the rotated image to obtain a third number of characters. Finally, the target image can be rotated 180 degrees, and text detection can be performed on the rotated image to obtain a fourth number of characters. The first, second, third, and fourth number of characters are compared, and the image with the highest value is sent to the display. For example, if the third number of characters is the largest, then the target image can be rotated 80 degrees to the right before display. Of course, after rotation, the maximum bounding box can be further detected to allow for scaling and adjustment for complete display.

[0117] like Figure 11 As shown in the embodiments of this application, an image display method is also provided, the method comprising:

[0118] 1101. Obtain the image to be processed; the image to be processed includes the target content;

[0119] 1102. Perform edge detection on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system, and select a first direction vector and a second direction vector from the multiple target vectors based on the length of the multiple target vectors; the angle between the first direction vector and the second direction vector is within a preset range;

[0120] 1103. Based on the first direction vector and the second direction vector, establish a second coordinate system and calculate the affine transformation matrix between the first coordinate system and the second coordinate system;

[0121] 1104. Based on the affine transformation matrix, rotate and translate the image to be processed to obtain the target image, and send the target image to the display for display.

[0122] The image display method provided in this application embodiment can be applied to the above-described display device embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.

[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A display device, characterized in that, include: The controller is configured as follows: Acquire the image to be processed; the image to be processed includes the target content; Edge detection is performed on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system. Based on the length of the multiple target vectors, a first direction vector and a second direction vector are selected from the multiple target vectors. The angle between the first direction vector and the second direction vector is within a preset range. Based on the first direction vector and the second direction vector, a second coordinate system is established, and the affine transformation matrix between the first coordinate system and the second coordinate system is calculated. Based on the affine transformation matrix, the image to be processed is rotated and translated to obtain the target image, and the target image is sent to the display. The display, connected to the controller, is configured to display the target image; Specifically, the controller selects a first direction vector and a second direction vector from multiple target vectors based on the lengths of the target vectors, and is configured as follows: Based on the directions of the multiple target vectors, the multiple target vectors are divided into multiple directional ranges; For each directional range, calculate the sum of the lengths of the target vectors within that directional range; Based on the sum of the multiple lengths, a first directional range and a second directional range are selected from the multiple directional ranges; A first direction vector is selected from the target vectors within the first direction range, and a second direction vector is selected from the target vectors within the second direction range.

2. The display device according to claim 1, characterized in that, When the controller performs edge detection on the image to be processed and obtains target vectors corresponding to multiple edges in the first coordinate system, it is specifically used for: Based on the corner extraction algorithm, corner points are extracted from the image to be processed to obtain multiple corner points; Line transformation is performed on multiple corner points to obtain target vectors corresponding to multiple edges in the first coordinate system.

3. The display device according to claim 2, characterized in that, When the controller selects a first directional range and a second directional range from multiple directional ranges based on multiple lengths, it is specifically used for: The directional range corresponding to the maximum value among the multiple lengths is determined as the first directional range; Determine at least one directional range whose angle with the first directional range is within a preset range; The first direction range is defined as the direction range with the longest length and the largest length among the at least one direction range.

4. The display device according to claim 2, characterized in that, When the controller selects a first direction vector from the target vectors within the first direction range, it is specifically used for: Using the length of each target vector within the first direction range as the weight, calculate the weighted direction within the first direction range; Calculate the direction difference between the weighted direction and the direction of each target vector within the first direction range; The target vector corresponding to the minimum value among the multiple directional differences is determined as the first directional vector.

5. The display device according to claim 4, characterized in that, When the controller calculates the weighted direction of the first direction range using the lengths of each target vector within the first direction range as weights, it is specifically used for: Calculate the sum of the products of the length and direction of each target vector within the first direction range; The ratio between the sum of the products and the sum of the lengths of the target vectors within the first direction range is determined as the weighted direction of the first direction range.

6. The display device according to any one of claims 1-5, characterized in that, When establishing a second coordinate system based on the first direction vector and the second direction vector, the controller is specifically used for: The intersection of the first direction vector and the second direction vector is defined as the origin of the second coordinate system; Establish the first number line of the second coordinate system on the straight line containing the first direction vector; Establish the second number line of the second coordinate system on the straight line containing the second direction vector.

7. The display device according to any one of claims 1-5, characterized in that, The controller is also configured to: Determine the maximum bounding box of the target content in the target image; If the maximum outer frame is larger than the preset display size, the target image is reduced in size to obtain a reduced target image, so that the display shows the reduced target image; If the maximum outer frame is smaller than the preset display size and the center of the maximum outer frame does not coincide with the center of the display interface of the monitor, the target display image is translated until the center of the maximum outer frame coincides with the center of the display interface of the monitor to obtain the translated image, so that the monitor displays the translated image.

8. The display device according to claim 7, characterized in that, When determining the maximum bounding box of the target content in the target image, the controller is specifically used for: A traversal search is performed from the edge of the display interface towards the center to determine the maximum bounding box of the target content in the target image.

9. The display device according to any one of claims 1-5, characterized in that, The controller is also configured to: The image to be processed is reduced in size based on a preset factor to obtain a reduced image to be processed. Accordingly, when the controller performs edge detection on the image to be processed, it is specifically used to perform edge detection on the scaled-down image to be processed. When the controller rotates and translates the image to be processed based on the affine transformation matrix to obtain the target image, it is specifically used to: adjust the affine transformation matrix based on the preset multiple to obtain the adjusted affine transformation matrix, and rotate and translate the image to be processed based on the adjusted affine transformation matrix to obtain the target image.

10. The display device according to any one of claims 1-5, characterized in that, The controller is also configured to: Perform text detection on the target image to obtain the first number of characters; The target image is rotated at least once by a preset angle, and text detection is performed on the target image after each rotation to obtain the corresponding second number of characters; The image corresponding to the largest of the first number of characters and at least one of the second number of characters is sent to the display so that the display shows the image corresponding to the largest number of characters.

11. An image display method, characterized in that, Acquire the image to be processed; the image to be processed includes the target content; Edge detection is performed on the image to be processed to obtain target vectors corresponding to multiple edges in a first coordinate system. Based on the length of the multiple target vectors, a first direction vector and a second direction vector are selected from the multiple target vectors. The angle between the first direction vector and the second direction vector is within a preset range. Based on the first direction vector and the second direction vector, a second coordinate system is established, and the affine transformation matrix between the first coordinate system and the second coordinate system is calculated. Based on the affine transformation matrix, the image to be processed is rotated and translated to obtain the target image, and the target image is sent to the display for display. The step of selecting a first direction vector and a second direction vector from the multiple target vectors based on their lengths includes: Based on the directions of the multiple target vectors, the multiple target vectors are divided into multiple directional ranges; For each directional range, calculate the sum of the lengths of the target vectors within that directional range; Based on the sum of the multiple lengths, a first directional range and a second directional range are selected from the multiple directional ranges; A first direction vector is selected from the target vectors within the first direction range, and a second direction vector is selected from the target vectors within the second direction range.

Citation Information

Patent Citations

  • Calibration plate used for measurement calibration of digital microscope and use method thereof

    CN104897051A

  • Bank card inclination correction detection method and device, readable storage medium and terminal

    CN112686812A