Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment," another embodiment "means" at least one additional embodiment, "and" some embodiments "means" at least some embodiments. Related definitions of other terms will be given in the description below. It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise. The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The existing chessboard detection technology has more limitations on shooting positions, shooting angles and the like of the chessboard, and is easy to generate distortion due to shooting images under shooting scenes with higher degrees of freedom, so that the problem of poor recognition accuracy of the positions of chessmen in the chessboard is caused.
In view of this, embodiments of the present disclosure provide a checkerboard image correction scheme, and the detailed implementation of the embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Fig. 1 is a process flow diagram of a checkerboard image correction method according to an exemplary embodiment of the present disclosure. As shown in the figure, this embodiment mainly includes the following steps:
step 102, detecting an initial image of the chessboard to obtain the chessmen category and absolute coordinates of each chessman in the chessboard.
In some embodiments, the original image of the checkerboard may be pre-processed, including but not limited to resizing, cropping, noise reduction, normalization, etc., to ensure that the image data is best available for subsequent processing.
In some embodiments, the target objects in the initial image may be classified and detected to obtain each piece in the chessboard and the category of each piece, and two diagonal points of the chessboard and two diagonal points of each piece are detected respectively to obtain the absolute coordinates of each vertex angle of the chessboard and the absolute coordinates of each piece.
In this embodiment, the absolute coordinates of each pawn are used to identify the centre point position of each pawn.
In some embodiments, an image detection model (e.g., a deep learning model) may be utilized to detect an initial image of the board, resulting in a piece category and absolute coordinates for each piece in the board.
In this embodiment the absolute coordinates of each pawn consist of a transverse absolute coordinate and a longitudinal absolute coordinate.
In this embodiment, the chessboard may include a go chessboard, and the chess pieces may include a white chess category and a black chess category.
Specifically, the image detection model may be utilized to perform target detection on an initial image of the chessboard based on given class labels (white chess labels and black chess labels), obtain a confidence value of each detection object in the chessboard, and determine each detection object with the confidence value greater than a confidence threshold (e.g., 0.8) as each target object, wherein each obtained target object is the black chess and white chess in the chessboard.
Preferably, the image detection model can be used for detecting the corner coordinates of the lower left corner and the upper right corner of the chess piece, namely the minimum Xmin, the Ymin coordinates and the maximum Xmax, the Ymax coordinates, and the transverse and longitudinal sizes of the chess piece can be calculated according to the coordinates of the two opposite corners to be w=xmax-Xmin and h=ymax-Ymin, so that the position of the central point of the chess piece, namely the absolute coordinates of the chess piece, can be calculated.
In this embodiment, the image detection model also outputs the vertex angle absolute coordinates of the 4 vertices of the checkerboard. Wherein, the detection means of the absolute coordinates of each vertex angle of the chessboard can refer to the description of the detection means of each corner point of the chessman.
Step 104, grouping each piece according to the absolute coordinates of each piece in the chessboard to obtain a plurality of strings of the chessboard.
In this embodiment, each piece belonging to the same string is located in the same row in the board. For example, in a go board, each piece belonging to the same string is located in the same row (row) or column (column) in the go board.
For example, in the example shown in fig. 2, the white chess 1, the white chess 2 and the white chess 3 belong to the same chess string, and the white chess 1, the black chess 1, the white chess 7, the white chess 10 and the black chess 9 belong to the same chess string.
In some embodiments, the plurality of strings of the board includes at least one transverse string and at least one longitudinal string.
For example, in the example shown in FIG. 2, the board includes 5 transverse strings and 7 longitudinal strings. Wherein the white chess 1, the white chess 2 and the white chess 3 belong to the same longitudinal chess string, the white chess 1, the black chess 1, the white chess 7, the white chess 10 and the black chess 9 belong to the same transverse chess string, and the like.
In some embodiments, each of the strings includes at least one chess piece. For example, in the example shown in fig. 2, the transverse chess string 5 includes only white chess 5.
In this embodiment, each piece is grouped into a transverse string and a longitudinal string, respectively, of the board.
For example, in the example shown in fig. 2, white chess 1 belongs to the horizontal chess string 1 and the vertical chess string 1, and white chess 2 belongs to the horizontal chess string 2 and the vertical chess string 1.
And 106, obtaining the relative coordinates of each piece in the chessboard based on the two absolute coordinates of any two adjacent pieces in each chess string.
In some embodiments, any one of the strings may be determined as a current string, one of the current strings is determined as a current piece, and a previous piece of the current string is determined as a previous piece in order of arrangement of pieces in the current string.
For example, in the example shown in fig. 2, a horizontal chess string (hereinafter referred to as a horizontal chess string 1) composed of white chess 1, black chess 1, white chess 7, white chess 10 and black chess 9 may be used as a current chess string, and the chess strings of the horizontal chess strings 1, namely white chess 1, black chess 1, white chess 7, white chess 10 and black chess 9, may be obtained by arranging the chess strings in order based on the absolute coordinates of the chess pieces. Wherein, when the black chess 1 is used as the current chess piece, the white chess 1 is the previous chess piece of the black chess 1, and when the white chess 7 is used as the current chess piece, the previous chess piece is the black chess 1.
In this embodiment, the relative coordinates of the previous chess pieces may be determined, and the distance between the current chess pieces and the previous chess pieces may be obtained according to the absolute coordinates of the current chess pieces and the absolute coordinates of the previous chess pieces, and the relative coordinates of the current chess pieces may be obtained based on the size of the chess grid of the chessboard, the distance between the current chess pieces and the previous chess pieces, and the relative coordinates of the previous chess pieces.
Specifically, according to the absolute coordinates of the current chess piece and the absolute coordinates of the previous chess piece, the interval distance between the current chess piece and the previous chess piece is obtained, the interval distance is divided by the chess grid size of the chessboard, the additional coordinate value of the current chess piece can be obtained, and the relative coordinates of the current chess piece can be obtained by adding operation according to the relative coordinates of the previous chess piece and the additional coordinate value of the current chess piece.
In this embodiment, the relative coordinates of each chess piece are composed of a transverse relative coordinate and a longitudinal relative coordinate, so that the transverse relative coordinate of each chess piece in the chessboard can be identified based on the two transverse absolute coordinates of any adjacent two chess pieces in each transverse chess string, and the longitudinal relative coordinate of each chess piece in the chessboard can be identified based on the two longitudinal absolute coordinates of any adjacent two chess pieces in each longitudinal chess string.
For example, when the current chess string is the horizontal chess string 1 and the current chess is the black chess 1, the horizontal spacing distance between the black chess 1 and the white chess 1 can be obtained according to the horizontal absolute coordinates of the black chess 1 and the white chess 1, then the horizontal spacing distance is divided by the size of the chess grid of the chessboard, the horizontal additional coordinate value of the black chess 1 can be obtained as "1", and the sum operation can be performed according to the horizontal relative coordinate value "1" of the white chess 1 and the horizontal additional coordinate value "1" of the black chess 1, so that the horizontal relative coordinate of the black chess 1 is obtained as "2".
For another example, when the current chess string is the horizontal chess string 1 and the current chess is the white chess 7, the horizontal spacing distance between the black chess 1 and the white chess 7 can be obtained according to the horizontal absolute coordinates of each of the black chess 1 and the white chess 7, then the horizontal spacing distance is divided by the size of the chess lattice of the chessboard, the horizontal additional coordinate value of the white chess 7 can be obtained as '2', and the sum operation can be performed according to the horizontal relative sitting '2' of the black chess 1 and the horizontal additional coordinate value '2' of the white chess 7, so as to obtain the horizontal relative coordinate of the white chess 7 as '4'.
In this embodiment, the transverse relative coordinates and the longitudinal relative coordinates of the same chess piece in the chessboard can be combined to obtain the relative coordinates of each chess piece in the chessboard. For example, the relative coordinates of the white chess 1 are (1, 1), the relative coordinates of the black chess 1 are (1, 2), the relative coordinates of the white chess 2 are (2, 1), and so on.
In some embodiments, in the case that the current chess piece is the first chess piece in the current chess string, the interval distance between the current chess piece and the given reference position is obtained according to the absolute coordinates of the current chess piece and the absolute coordinates of the given reference position of the chessboard, and the relative coordinates of the current chess piece are obtained based on the size of the chess grid of the chessboard and the interval distance between the current chess piece and the given reference position.
Referring to fig. 2, in the case that the current chess string is the horizontal chess string 1 and the current chess piece is the white chess 1, the horizontal interval distance between the white chess 1 and the given reference position can be calculated, the horizontal interval distance is divided by the size of the chess grid of the chessboard to obtain the horizontal additional coordinate value of the white chess 1 as "1", and the horizontal relative coordinate value of the white chess 1 as "1" is obtained according to the addition result of the horizontal relative coordinate value of the given reference position as "0" and the horizontal additional coordinate value of the white chess 1 as "1".
And 108, reconstructing an image based on the relative coordinates of each chess piece in the chessboard and the classification of the chess pieces to obtain a corrected image of the chessboard.
In some embodiments, one of the pawns closest to the given reference position may be determined as a reference pawn and each pawn other than the reference pawn may be determined as a non-reference pawn according to the given reference position in the standard grid of the board, the relative coordinates or the absolute coordinates of each pawn.
In this example, one vertex angle position in the standard grid of the board may be determined as a given reference position in the standard grid of the board. For example, in the example shown in fig. 2, the left lower corner vertex of the board may be determined as a given reference position, and the white chess 1 nearest to the left lower corner vertex may be determined as a reference chess, and the white chess 2 to the white chess 10 and the black chess 1 to the black chess 10 may be determined as non-reference chess pieces.
In some embodiments, the positioning position of the reference chess pieces in the standard chess grid may be determined based on a given reference position of the chess board and the relative coordinates of the reference chess pieces, the positioning position of each non-reference chess piece in the standard chess grid of the chess board may be determined based on the positioning position of the reference chess pieces and the relative coordinates of each non-reference chess piece, and the standard chess grid may be rendered based on the positioning positions of the reference chess pieces and each non-reference chess piece in the standard chess grid and the chess piece category of each non-reference chess piece, resulting in a corrected image of the chess board.
For example, the positioning position of the white chess 1 in the standard chess grid may be determined based on the coordinate position of the left corner vertex of the chessboard and the relative coordinates (1, 1) of the white chess 1, and the positioning position of each non-reference chess piece in the standard chess grid of the chessboard may be reversely deduced based on the positioning position of the white chess 1 and the relative coordinates of each non-reference chess piece (i.e. white chess 2 to white chess 10 and black chess 1 to black chess 10), so that the standard chess grid of the chessboard may be subjected to image rendering processing, and the corrected image of the chessboard may be obtained.
In summary, the chessboard image correction device of the embodiment performs chess piece grouping by detecting the absolute coordinates of each chess piece to obtain a plurality of chess strings in the chessboard, and recursively calculates the relative coordinates of each chess piece according to the position arrangement sequence of each chess piece in the chess strings, thereby effectively reducing the problem of inaccurate positioning of the chess pieces caused by image distortion.
Specifically, in the conventional scheme, a single datum point is generally used for positioning each piece in the chessboard, and when distortion problems such as distortion exist in an image, the positioning offset of the piece far from the datum point is also increased. The positioning positions of adjacent chessmen are sequentially calculated by using a recursion calculation scheme, so that the relative position error between corrected chessmen cannot exceed a checkerboard, the position relationship between the chessmen can be accurately corrected, and the positioning accuracy of the chessmen is effectively improved.
Fig. 3 is a process flow diagram of a checkerboard image correction method according to another exemplary embodiment of the present disclosure. As shown, this embodiment illustrates a specific implementation of step 104 described above.
It should be noted that the chess piece grouping scheme of the present embodiment is performed only for one direction in the chessboard, and each of the transverse strings and each of the longitudinal strings in the chessboard can be determined by performing the processing steps of the present embodiment twice.
In order to avoid obscuring the technical key points of the proposal, and facilitate readers to understand the technical proposal of the embodiment more clearly, the following description only takes the generation of each transverse chess string in the chessboard as an example, and the following proposal is also applicable to the generation of each longitudinal chess string in the chessboard, and is described earlier. As shown in the figure, this embodiment mainly includes the following steps:
Step 302, each piece to be grouped which does not form a chess string is determined from the pieces in the chessboard.
For example, in the example shown in fig. 2, in the case where the lateral strings 1 in the board are determined, the white chess pieces 2 to 6, the white chess pieces 8, the white chess pieces 9, the black chess pieces 2 to 8, and the black chess pieces 10 may be determined as chess pieces to be grouped. In the case of determining the transverse strings 1 and2 in the chessboard, the white 3 to white 6, white 8, black 3 to black 6, black 8 may be determined as the pieces to be grouped.
Step 304, determining a reference chess piece from the chess pieces to be grouped based on the given reference position of the chessboard, and determining each chess piece to be grouped which is not determined as the reference chess piece as a candidate chess piece of the reference chess piece.
In this embodiment, the one piece to be grouped closest to the given reference position may be determined as the reference piece based on the given reference position of the board, the absolute coordinate position of each piece.
In this embodiment, the given reference position of the board is determined based on the absolute coordinates of one of the corners of the board. For example, in the example shown in FIG. 2, the lower left corner position of the checkerboard may be determined to be a given reference position.
Wherein, under the condition that any transverse chess strings are not determined, the white chess 1 (to-be-grouped chess pieces) is the reference chess piece closest to the given reference position, the white chess 2 to the white chess 10 and the black chess 1 to the black chess 10 are all candidate chess pieces of the white chess 1, under the condition that the transverse chess strings 1 are determined, the white chess 2 (to-be-grouped chess pieces) is the reference chess piece closest to the given reference position, and the white chess 3 to the white chess 6, the white chess 8, the white chess 9, the black chess 2 to the black chess 8 and the black chess 10 are candidate chess pieces of the white chess 2.
Step 306, determining each target chess piece of the reference chess piece from the candidate chess pieces according to the coordinate difference between the absolute coordinates of each candidate chess piece and the absolute coordinates of the reference chess pieces, and forming a chess string of the chessboard based on the reference chess piece and each target chess piece.
In this embodiment, that is, under the condition of generating each transverse chess string in the chessboard, the absolute longitudinal coordinate of each candidate chess piece and the absolute longitudinal coordinate of the reference chess piece can be subjected to difference calculation to obtain a longitudinal offset value of each candidate chess piece compared with the reference chess piece, each candidate chess piece with the longitudinal offset value smaller than a given longitudinal offset threshold value is determined as a target chess piece of the reference chess piece, and a transverse chess string of the chessboard is formed based on the reference chess piece and each target chess piece.
In this embodiment, the given longitudinal offset threshold is determined based on the pawn size of each pawn.
For example, in the case that the reference chess piece is the white chess piece 1, the absolute longitudinal coordinate of each candidate chess piece can be traversed, each candidate chess piece (namely, the black chess piece 1, the white chess piece 7, the white chess piece 10 and the black chess piece 9) with the longitudinal deviation value not exceeding the radius of the chess piece is determined as the target chess piece of the white chess piece 1, and the transverse chess strings 1 of the chessboard are formed based on the white chess piece 1, namely, the black chess piece 1, the white chess piece 7, the white chess piece 10 and the black chess piece 9.
In other embodiments, in the case of generating each longitudinal chess string in the chessboard according to the present embodiment, the absolute lateral coordinate of each candidate chess piece and the absolute lateral coordinate of the reference chess piece may be calculated to obtain a lateral offset value of each candidate chess piece compared to the reference chess piece, and each candidate chess piece with the lateral offset value smaller than the given lateral offset threshold value may be determined as the target chess piece of the reference chess piece, so as to form one longitudinal chess string of the chessboard based on the reference chess piece and each target chess piece. Wherein the given lateral offset threshold may also be determined based on the pawn size of each pawn.
In some embodiments, in case that the target chess pieces of the reference chess pieces are not present in the candidate chess pieces, a chess string of the chessboard is directly based on the reference chess pieces. For example, a transverse chess string 5 as shown in fig. 2.
Step 308, judging whether the chessboard has chessmen to be grouped, if so, returning to step 302, otherwise, performing step 310.
Specifically, when judging that the chess pieces to be grouped do not exist in the chessboard, the grouping operation of all the chess pieces in the chessboard is completed.
Step 310, each chess string of the chessboard is obtained.
In summary, the embodiment recursively traverses each piece based on the absolute coordinates of each piece to group each piece into a plurality of strings, so as to implement conversion processing of the relative coordinates of the pieces, realize automatic correction processing of the relative positions between the pieces, and improve the positioning accuracy of the pieces.
Fig. 4 shows a block diagram of a checkerboard image correction device according to an exemplary embodiment of the present disclosure. As shown in the drawing, the checkerboard image correction device 400 of the present embodiment includes:
The detection module 402 detects an initial image of a chessboard to obtain a chessman category and absolute coordinates of each chessman in the chessboard;
Grouping module 404, which groups each piece according to the absolute coordinates of each piece in the chessboard to obtain a plurality of strings of pieces of the chessboard, wherein each piece belonging to the same string is located in the same row in the chessboard;
the conversion module 406 obtains the relative coordinates of each chess piece in the chessboard based on the two absolute coordinates of any two adjacent chess pieces in each chess string;
the reconstruction module 408 performs image reconstruction based on the relative coordinates of each chess piece in the chessboard and the classification of the chess piece, and obtains a corrected image of the chessboard.
In some embodiments, the detection module 402 is further configured to perform classification detection on each target object in the initial image to obtain each piece in the chessboard and a category of each piece, detect two diagonal points of the chessboard and two diagonal points of each piece to obtain an absolute coordinate of each vertex angle of the chessboard and an absolute coordinate of each piece, where the absolute coordinate of each piece is used to identify a center point position of each piece.
In some embodiments grouping module 404 is further configured to determine each piece to be grouped that does not form a string of pieces from among the pieces in the board, determine a reference piece from among the pieces to be grouped based on a given reference position of the board and determine each piece to be grouped that is not determined as a candidate for the reference piece, determine each target piece for the reference piece from among the candidate pieces based on a difference in coordinates between an absolute coordinate of each candidate piece and an absolute coordinate of the reference piece and form a string of pieces of the board based on the reference piece and each target piece, and return to performing the step of determining each piece to be grouped that does not form a string of pieces from among the pieces in the board until no piece to be grouped is present in the board.
In some embodiments grouping module 404 is further configured to determine, as a reference pawn, a pawn to be grouped closest to a given reference position of the board based on an absolute coordinate position of each pawn, wherein the given reference position is determined based on an apex angle absolute coordinate of the board.
In some embodiments, each of the strings includes at least one chess piece.
In some embodiments grouping module 404 is further configured to compose a string of the board directly based on the reference pawn in the absence of a target pawn for the reference pawn in each candidate pawn.
In some embodiments, the plurality of strings includes at least one transverse string and at least one longitudinal string, the absolute coordinates of each of the plurality of pieces being comprised of a transverse absolute coordinate and a longitudinal absolute coordinate.
In some embodiments, the grouping module 404 is further configured to calculate a difference between the absolute longitudinal coordinate of each candidate piece and the absolute longitudinal coordinate of the reference piece, to obtain a longitudinal offset value of each candidate piece compared to the reference piece, determine each candidate piece with a longitudinal offset value smaller than a given longitudinal offset threshold as a target piece of the reference piece, and form a transverse chess string of the chessboard based on the reference piece and each target piece.
In some embodiments, the grouping module 404 is further configured to calculate a difference between the absolute lateral coordinate of each candidate chess piece and the absolute lateral coordinate of the reference chess piece, to obtain a lateral offset value of each candidate chess piece compared to the reference chess piece, determine each candidate chess piece with a lateral offset value smaller than a given lateral offset threshold as a target chess piece of the reference chess piece, and form a longitudinal chess string of the chessboard based on the reference chess piece and each target chess piece.
In some embodiments, the given longitudinal offset threshold or the given lateral offset threshold is determined based on a pawn size of each pawn.
In some embodiments, the conversion module 406 is further configured to determine any one of the strings as a current string, sequentially determine one of the current strings as a current piece, determine a previous piece of the current piece as a previous piece, and determine a relative coordinate of the previous piece according to an arrangement order of pieces in the current string, obtain a distance between the current piece and the previous piece according to an absolute coordinate of the current piece and an absolute coordinate of the previous piece, and obtain a relative coordinate of the current piece based on a size of a checkerboard of the chessboard, a distance between the current piece and the previous piece, and a relative coordinate of the previous piece.
In some embodiments, the conversion module 406 is further configured to obtain, when the current chess piece is a first chess piece in the current chess string, a separation distance between the current chess piece and a given reference position of the chessboard according to an absolute coordinate of the current chess piece and an absolute coordinate of the given reference position, and obtain a relative coordinate of the current chess piece based on a size of a chess grid of the chessboard and the separation distance between the current chess piece and the given reference position.
In some embodiments, the plurality of strings includes at least one transverse string and at least one longitudinal string, each of the pieces being grouped into one transverse string and one longitudinal string of the board, respectively, an absolute coordinate of each of the pieces being composed of one transverse absolute coordinate and one longitudinal absolute coordinate, and a relative coordinate of each of the pieces being composed of one transverse relative coordinate and one longitudinal relative coordinate.
In some embodiments, the conversion module 406 is further configured to identify a lateral relative coordinate of each piece in the chessboard based on two lateral absolute coordinates of any adjacent two pieces in each lateral string, identify a longitudinal relative coordinate of each piece in the chessboard based on two longitudinal absolute coordinates of any adjacent two pieces in each longitudinal string, and combine the lateral relative coordinate and the longitudinal relative coordinate of the same piece in the chessboard to obtain a relative coordinate of each piece in the chessboard.
In some embodiments, the reconstruction module 408 is further configured to determine one of the chess pieces closest to the given reference position as a reference chess piece and each chess piece other than the reference chess piece as a non-reference chess piece based on the given reference position of the chess board and the relative coordinates of the reference chess pieces, determine the positioning position of the reference chess piece in the standard chess piece based on the positioning position of the reference chess piece and the relative coordinates of each non-reference chess piece, determine the positioning position of each non-reference chess piece in the standard chess piece of the chess board based on the positioning position of the reference chess piece and the relative coordinates of each non-reference chess piece, and render the standard chess piece based on the positioning positions of the reference chess piece and each non-reference chess piece in the standard chess piece and the classification of the reference chess piece and each non-reference chess piece, thereby obtaining a corrected image of the chess board.
The embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the checkerboard image correction method according to the exemplary embodiments of the present disclosure.
The exemplary embodiments of the present disclosure also provide an electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor. The memory stores a computer program executable by the at least one processor for causing the electronic device to perform the checkerboard image correction method according to exemplary embodiments of the present disclosure when executed by the at least one processor.
Referring to fig. 5, a block diagram of an electronic device 500 that may be a server or client of the present disclosure, which is an example of a hardware device that may be applied to aspects of the present disclosure, will now be described. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the electronic device 500 includes a computing unit 501 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM 502, and RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the electronic device 500 are connected to the I/O interface 505, including an input unit 506, an output unit 507, a storage unit 508, and a communication unit 509. The input unit 506 may be any type of device capable of inputting information to the electronic device 500, and the input unit 506 may receive input numeric or character information and generate key signal inputs related to user settings and/or function controls of the electronic device. The output unit 507 may be any type of device capable of presenting information and may include, but is not limited to, a display, speakers, video/audio output terminals, vibrators, and/or printers. Storage unit 508 may include, but is not limited to, magnetic disks, optical disks. The communication unit 509 allows the electronic device 500 to exchange information/data with other devices over a computer network such as the internet and/or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and/or chipsets, such as bluetooth (TM) devices, wiFi devices, wiMax devices, cellular communication devices, and/or the like.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, a checkerboard image correction method as described above may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 500 via the ROM 502 and/or the communication unit 509. In some embodiments, the computing unit 501 may be configured to perform the above-described checkerboard image correction method by any other suitable means (e.g. by means of firmware).
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user, for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback), and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data service), or that includes a middleware component (e.g., an application service), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a Local Area Network (LAN), a Wide Area Network (WAN), and the Internet.
The computer system may include a client and a server. The client and the server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be noted that each component/step described in the embodiments of the present disclosure may be split into more components/steps, or two or more components/steps or partial operations of the components/steps may be combined into new components/steps according to implementation needs, to achieve the objects of the embodiments of the present disclosure.
The above embodiments are only for illustrating the embodiments of the present disclosure, not for limiting the embodiments of the present disclosure, and various changes and modifications may be made by one of ordinary skill in the relevant art without departing from the spirit and scope of the embodiments of the disclosure, so all equivalent technical solutions also fall within the scope of the embodiments of the present disclosure, the scope of which is defined by the claims.