Method and device for converting from any application to red-blue weak hyperopia application, terminal and medium
By layering objects in games or applications left and right and performing color filtering, the problems of boring and high cost of visual training software are solved, and better visual training effects and cost-effective binocular vision training for red and blue deficiency are achieved.
Patent Information
- Application Number
- CN202211225526.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-10-09
AI Technical Summary
Existing visual training software, especially for children, is too boring and cannot achieve good visual training results. In addition, the workload of producing red and blue grating training images is large and the cost is high.
By layering any object in the game or application left and right, performing color filtering and fusion, a red and blue raster output is achieved, which is suitable for patients of different age groups.
It achieves better amblyopia training effects, reduces production and R&D costs, is applicable to a variety of cross-platform engines, and provides 3D effects for red and blue amblyopia binocular vision training.
Smart Images

Figure CN115607416B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of AI-based vision training, in particular to a conversion method and device from an arbitrary application to a red-blue amblyopia training application, a terminal and a medium. BACKGROUND
[0002] There are various red-blue grating training software on the market at present, but most of them are through a few fixed red-blue training pictures for amblyopia training. At present, some are only very simple game training software. Since the red-blue effect needs to be achieved, a large number of red-blue pictures are required, which is a very large workload, including red pictures, blue pictures, red-blue composite pictures, etc. Moreover, the color materials of the game scenes are very different, resulting in several times the workload of normal software development.
[0003] Although some existing vision training software for children with amblyopia is specially designed for children, it is too simple, and children quickly feel boring after using these software. Therefore, there is an urgent need in the art for a technical solution with better vision training effect. SUMMARY
[0004] In view of the above-mentioned shortcomings of the prior art, the purpose of the present application is to provide a conversion method and device from an arbitrary application to a red-blue amblyopia training application, a terminal and a medium, which is used to solve the technical problem that the existing vision training software (especially for children) is too boring and cannot achieve good vision training effect.
[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides a conversion system from an arbitrary application to a red-blue amblyopia training application, which comprises: an initialization module for left and right layering of each component object in the current application to be converted; a red-blue grating data input module for obtaining left and right layer display data cache, setting an input rendering model according to the mounted grating object and performing input setting of the red-blue grating state; a grating rendering data processing module for updating the parameters of the red-blue grating; and performing three-primary color filtering on the left image layer component object and the right image layer component object, and performing fusion processing on the filtered left image layer component object and the right image layer component object; and cropping the fused red-blue view; a grating red-blue binocular vision output module for synchronously outputting the red-blue grating output image of the left layer and the right layer.
[0006] In some embodiments of the first aspect of the present application, the initialization module comprises: a component object layering initialization module for creating a left layer level and a right layer level, classifying each component object of the current application to be converted to the corresponding level, and defining a left-eye and right-eye shared 3D layer; a red-blue binocular vision environment construction module for creating and initializing a left virtual camera and a right virtual camera; and a black-white grating environment construction module for constructing a black-white grating environment.
[0007] In some embodiments of the first aspect of the application, the visual object component classification module is configured to create a left image layer component object and a right image layer component object.
[0008] In some embodiments of the first aspect of the application, the red-blue anaglyph environment construction module comprises: a first external input parameter initialization module configured to initialize an external input parameter; a left-right layer camera object creation module configured to create a virtual camera parameter for a left layer and a right layer; a left-right camera format definition module configured to define a virtual camera format for the left layer and the right layer; a left-right camera display target output creation module configured to output a display target of the virtual camera; a left-right camera position initialization module configured to initialize a position of the virtual camera for the left layer and the right layer; and a left-right camera rendering initialization module configured to initialize a rendering of the virtual camera for the left layer and the right layer.
[0009] In some embodiments of the first aspect of the application, the red-blue raster data input module comprises: a left-right layer display data cache collection module configured to collect a data cache for the left layer and the right layer; a rendering model setting module configured to set an input rendering model according to a mounted raster object; and a red-blue raster state setting module configured to set an input state of a red-blue raster.
[0010] In some embodiments of the first aspect of the application, the raster rendering data processing module comprises: a red-blue raster position and state updating module configured to update a position and a state of a red-blue raster; a red-blue anaglyph left-right fusion module configured to perform the following operations on the left image layer component object and the right image layer component object: performing a three-primary color RGB color filtering process on the left image layer component object to filter out a red channel value of each pixel point in each component object, and performing a three-primary color RGB color filtering process on the right image layer component object to filter out a green channel value and a blue channel value of each pixel point in each component object; performing an RGB color fusion process on the filtered left image layer component object and the right image layer component object to obtain a fused red-blue view; and a red-blue view cropping module configured to crop the fused red-blue view.
[0011] In some embodiments of the first aspect of the application, the raster red-blue anaglyph output module comprises: a red-blue raster output layer creation module configured to create a red-blue raster output layer; and an output layer display synchronization module configured to synchronously display a red-blue raster output of the left layer and the right layer.
[0012] To achieve the above object and other related objects, the second aspect of the present application provides a method for converting an arbitrary application into a red-blue amblyopia training application, comprising: layering left and right of each component object in the current application to be converted; obtaining left and right layer display data cache, setting input rendering model according to the mounted raster object and performing input setting of red-blue raster state; updating parameters of the red-blue raster; performing three-primary color filtering on the left image layer component object and the right image layer component object, and performing fusion processing on the filtered left image layer component object and the right image layer component object; performing cropping on the fused red-blue view; and synchronously outputting red-blue raster output images of the left layer and the right layer.
[0013] To achieve the above object and other related objects, the third aspect of the present application provides a computer readable storage medium having a computer program stored thereon, wherein the computer program is executed by a processor to implement the method for converting an arbitrary application into a red-blue amblyopia training application.
[0014] To achieve the above object and other related objects, the fourth aspect of the present application provides an electronic terminal, comprising: a processor and a memory; the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so that the terminal executes the method for converting an arbitrary application into a red-blue amblyopia training application.
[0015] As described above, the method, device, terminal and medium for converting an arbitrary application into a red-blue amblyopia training application have the following beneficial effects: to solve the compliance problem of amblyopia patients in treating amblyopia eyes, the training software on the market is fixed for an artist to modify pictures to achieve red-blue effect. The principle is to remove the blue channel and the green-blue channel of two pictures by an artist, and then fuse the two pictures. However, this method is too time-consuming and labor-intensive and has high cost. The present application can divide any object in a game or application into left and right layers, and then fuse the left and right layers by color filtering processing. The advantage of this method is that any game can be converted into a red-blue amblyopia training software, so that application software more suitable for patients of various ages (such as children) can be selected and converted into a red-blue amblyopia training software, thereby achieving better amblyopia training effect. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 FIG. 1 shows a schematic diagram of a system for converting an arbitrary application into a red-blue amblyopia training application according to an embodiment of the present application.
[0017] Figure 2 FIG. 4 shows a schematic diagram of an initialization module according to an embodiment of the present application.
[0018] Figure 3 FIG. 6 shows a schematic diagram of a component object layering initialization module according to an embodiment of the present application.
[0019] Figure 4 A schematic diagram of component object classification results is shown in an embodiment of the present application.
[0020] Figure 5 A structural schematic diagram of a red-blue binocular vision environment construction module is shown in an embodiment of the present application.
[0021] Figure 6 A structural schematic diagram of a black-white raster environment construction module is shown in an embodiment of the present application.
[0022] Figure 7 A structural schematic diagram of a red-blue raster data input module is shown in an embodiment of the present application.
[0023] Figure 8 A structural schematic diagram of a raster rendering data processing module is shown in an embodiment of the present application.
[0024] Figure 9 A structural schematic diagram of a raster red-blue binocular vision output module is shown in an embodiment of the present application.
[0025] Figure 10 A flowchart of a transition method from an arbitrary application to a red-blue weak binocular vision training application is shown in an embodiment of the present application.
[0026] Figure 11 A structural schematic diagram of an electronic terminal is shown in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The above embodiments of the present application are shown and described in connection with the drawings. From the above description, one skilled in the art could easily ascertain the essential characteristics of the present application, and without departing from the spirit and scope thereof, could make various changes and modifications of the application to adapt it to various usages and conditions. Thus, other embodiments of the present application are also within the scope of the following claims.
[0028] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting, unless the context clearly indicates otherwise. Spatially relative terms, such as "upper", "lower", "left", "right", "beneath", "below", "bottom", "top", "positioned on", "positioned above", "positioned below", and the like, can be used herein for ease of description to describe one element or feature's relationship to another element(s) or feature(s) as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientations depicted in the figures. For example, if a device described is turned over in use, a relative term can
[0029] In this application, unless otherwise explicitly specified and limited, the terms "mount", "connect", "connection", "fixed", "hold" and the like should be interpreted broadly, for example, can be fixed connection, can also be detachable connection, or integrally connected; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.
[0030] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", when used herein, specify the presence of stated features, operations, elements, components, items, and / or objects, but do not preclude the presence or addition of one or more other features, operations, elements, components, items, and / or objects. The terms "or" and "and / or" as used herein are to be interpreted as inclusive or meaning either or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". An exception to this definition will occur only when a combination of elements, functions, or operations are in some way inherently mutually exclusive.
[0031] To solve the problems in the background art, the present application provides a method, device, terminal and medium for converting from any application to red-blue weak binocular vision training application, which can save a large amount of art and research and development cost, and can meet the requirements of different trainers. The red-blue weak binocular vision training application provided by the present application can be integrated based on a plurality of cross-platform engines, including but not limited to Android engine, Unity3D engine, Cocos engine, etc. The application of these engines is dynamically divided into left and right layers of red-blue effect, so that the trainer has 3D effect after wearing red-blue glasses.
[0032] Meanwhile, in order to make the objects, technical solutions and advantages of the present application clearer, the further detailed description of the technical solutions in the embodiments of the present application will be provided in conjunction with the following embodiments and the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and not used to limit the present application.
[0033] The embodiment of the present application provides a transition method from an arbitrary application to a red-blue anaglyphic application, a transition system from an arbitrary application to a red-blue anaglyphic application, and a storage medium storing an executable program for implementing the transition method from an arbitrary application to a red-blue anaglyphic application. In terms of the implementation of the transition system from an arbitrary application to a red-blue anaglyphic application, the embodiment of the present application will illustrate an exemplary implementation scenario of the transition from an arbitrary application to a red-blue anaglyphic application.
[0034] As shown in Figure 1 , a schematic diagram of a transition system from an arbitrary application to a red-blue anaglyphic application in the embodiment of the present application is shown. The transition system from an arbitrary application to a red-blue anaglyphic application in the embodiment mainly includes an initialization module 10, a red-blue raster data input module 20, a raster rendering data processing module 30, and a raster red-blue anaglyphic output module 40. The following will provide a detailed explanation of each module in the system.
[0035] The initialization module 10 is used to perform left-right hierarchical layering on each component object in the current application to be transitioned, that is, to complete the memory required by the red-blue raster, and to determine which components in the application are assigned to the left layer and which components are assigned to the right layer.
[0036] In the embodiment, the structure of the initialization module 10 is shown in Figure 2 , which includes a component object hierarchical layering initialization module 11, a red-blue anaglyphic environment construction module 12, and a black-white raster environment construction module 13.
[0037] The component object hierarchical layering initialization module 11 is used to create left and right hierarchical levels, and to classify each component object of the current application to be transitioned into the corresponding level, and to define a left-right eye shared 3D layer. Preferably, the component object hierarchical layering initialization module 11 can provide a visual interface for the user to complete the hierarchical level determination by dragging through interface interaction, that is, selecting a component object and dragging it to the left to assign it to the left layer, or dragging it to the right to assign it to the right layer.
[0038] In the embodiment, the structure of the component object hierarchical layering initialization module 11 is shown in Figure 3As shown, it specifically includes a hierarchy creation module 111, a visual object component classification module 112, and a left-right eye shared 3D layer module 113. The hierarchy creation module 111 is configured to create left and right hierarchies; the visual object component classification module 112 is configured to classify each component object of the current application to be converted into a corresponding hierarchy; and the left-right eye shared 3D layer module 113 is configured to define a left-right eye shared 3D layer.
[0039] In some examples, the visual object component classification module 112 is configured to create left and right image layer component objects, and a classification result diagram is as shown in Figure 4 As shown, the left image layer component objects include component objects L1, L2, …, Ln, and the right image layer component objects include component objects R1, R2, …, Rn.
[0040] Preferably, the process of classifying each component object in the application by the visual object component classification module 112 further includes: selecting a part of the component objects in the application whose initial sizes are less than the first size threshold and greater than the second size threshold as dedicated component objects in the left image layer component objects, and selecting another part of the component objects in the application whose initial sizes are less than the first size threshold and greater than the second size threshold as dedicated component objects in the right image layer component objects; and wherein the difference between the number of dedicated component objects in the left image layer component objects and the number of dedicated component objects in the right image layer component objects is less than a preset difference. For example, the size of the preset difference can be adjusted according to the needs of different application scenarios, and thus the number of component objects that can be seen by the left and right eyes of the user after wearing glasses can be adjusted. For example, when the preset difference is 0 or 1, the number of component objects seen by the left and right eyes of the user is consistent or differs by 1.
[0041] In some examples, the left-right eye shared 3D layer module 113 is provided with a component object shared by the left and right image layer component objects, and the specific process includes: selecting a component object in the application whose initial size is greater than or equal to a first threshold or less than or equal to a second threshold as a shared component object; and the left and right image layer component objects both include the shared component object; wherein the first threshold is greater than the second threshold.
[0042] The red-blue binocular vision environment construction module 12 is configured to create and initialize left and right virtual cameras; the left image layer component objects are carried by a left virtual camera display carrier, and the right image layer component objects are carried by a right virtual camera display carrier.
[0043] In this embodiment, the structure of the red-blue binocular vision environment construction module 12 is as shown in Figure 5As shown, including the first external input parameter initialization module 121, left and right layer camera object creation module 122, left and right camera format definition module 123, left and right camera display target output creation module 124, left and right camera position initialization module 125, left and right camera rendering initialization module 126.
[0044] Specifically, the first external input parameter initialization module 121 is used for initializing the external input parameter. For example, the external input parameter includes but is not limited to:
[0045] balance_R[1],balance_R[2],balance_R[3],balance_G[1],balance_G[2],balance_G[3]
[0046] balance_B[1],balance_B[2],balance_B[3] respectively used to indicate the weight coefficient when RGB color filtering is performed on a single pixel point, the value range of each weight coefficient is greater than or equal to 0 and less than or equal to 1, and the initialization is displayed and input by Unity3d visualization. It should be understood that the Unity engine is a real-time 3D interactive content creation and operation platform, including game development, art, architecture, automobile design, film and television, and all creations, and the Unity can turn ideas into reality.
[0047] The left and right layer camera object creation module 122 is used to create virtual camera parameters of left and right layers. For example, the parameters of the virtual camera can be constructed according to the parameters of the real camera, so that the virtual camera and the real camera are the same in position, direction, focal length and other related parameters, so that the virtual camera and the real camera are consistent in visual effect. Taking the creation of a camera in the AE graphics video processing software as an example, a 3D scene is set on the timeline after opening the AE software, a "camera" is newly created in the blank of the timeline panel, a camera layer appears on the timeline after the camera is created, and the position and direction of the camera are adjusted. Parameters, you can view the 3D scene from different angles.
[0048] The left and right camera format definition module 123 is used to define the format of the virtual camera, such as supporting BMP or JPG image files, GIF animation files, AVI, MPG, WMV, ASF and MOV video files. The virtual camera is a kind of software camera, which can simulate a real camera, such as Microsoft Net meeting, CU-Seeme, etc. In this way, even if the computer does not have a camera, these software can still be used to virtual video.
[0049] The left and right camera display target output creation module 124 is used to output the display target of the virtual camera of the left and right layer, for example, by using the virtual camera software to load and play the pre-prepared image.
[0050] The left and right camera position initialization module 125 is used to initialize the position of the virtual camera of the left and right layer. The specific process includes: during system initialization, the proportional relationship between the real camera and the virtual camera is coordinated, and the real camera (generating the foreground image) and the virtual camera (generating the background image) are always kept in synchronization and interlocking. For this purpose, the following parameters of the real camera need to be determined: the x, y, z coordinate values of the blue background; the range of the pitch, pan and rotatable angle of the camera; and the focal length range of the lens, etc. Subsequently, all the above-mentioned parameters of the real camera are transmitted into the computer for analysis, and the system issues a control quality to the virtual background image related to the foreground image, so as to complete the initialization.
[0051] The left and right camera rendering initialization module 126 is used to initialize the rendering of the virtual camera of the left and right layer. Specifically, the rendering initialization of each game engine virtual camera is the conventional rendering initialization operation of the engine such as Unity3D, such as rendering context environment initialization according to image resolution, color format, depth, etc.
[0052] The black and white raster environment construction module 13 is used to construct a three-dimensional environment image by using a black and white raster. The black and white raster environment construction module 13 is a way to treat amblyopia, and can increase the curative effect when used together with the red and blue raster mode. Specifically, the structure of the black and white raster environment construction module 13 is as shown in Figure 6 The second external input parameter initialization module 131 and the multi-type raster shader initialization module 132 are included.
[0053] Specifically, the second external input parameter initialization module 131 is used to initialize and set the external input parameters. The input parameters in the second external input parameter initialization module 131 refer to the external input parameters of the black and white raster, which include the interval parameters and width, radius, etc. of the black and white raster, and the setting mode can also be displayed and input by using the unity3d visualization mode.
[0054] The multi-type raster shader initialization module 132 is configured to initialize the shader. The shader is used to implement image rendering, wherein the Vertex Shader is mainly responsible for the operation of the geometric relationship of the vertex, and the Pixel Shader is mainly responsible for the calculation of the color of the pixel source. The raster is a dense ruled line on transparent glass at equal intervals (or unequal intervals), so that the ruled line is opaque and the unruled line is transparent, thereby forming a light-transmitting and non-light-transmitting or light-reflecting and non-light-reflecting photoelectric element.
[0055] The red-blue raster data input module 20 is configured to obtain left and right layer display data buffers, set an input rendering model according to a mounted raster object, and perform input setting of a red-blue raster state. Specifically, as shown in Figure 7 , the red-blue raster data input module 20 includes a left and right layer display data buffer collection module 21, a rendering model setting module 22, and a red-blue raster state setting module 23.
[0056] The left and right layer display data buffer collection module 21 is configured to collect data buffers of left and right layers; the rendering model setting module 22 is configured to set an input rendering model according to a mounted raster object; and the red-blue raster state setting module 23 is configured to perform input setting of a red-blue raster state.
[0057] The raster rendering data processing module 30 is configured to perform rendering processing on the red-blue raster data collected by input. Specifically, as shown in Figure 8 , the raster rendering data processing module 30 includes a red-blue raster position and state updating module 31, a red-blue binocular view left-right fusion module 32, and a red-blue view clipping module 33.
[0058] The red-blue raster position and state updating module 31 is configured to update the position and state of the red-blue raster. The red-blue binocular view left-right fusion module 32 is configured to perform the following operations on the left image layer component object and the right image layer component object: performing three-primary-color RGB color filtering processing on the left image layer component object to filter out the red channel value of each pixel point in each component object, and performing three-primary-color RGB color filtering processing on the right image layer component object to filter out the green channel value and the blue channel value of each pixel point in each component object; and performing RGB color fusion processing on the filtered left image layer component object and the right image layer component object to obtain a fused red-blue view. The red-blue view clipping module 33 is configured to clip the fused red-blue view.
[0059] Specifically, the process of performing three-primary-color RGB color filtering processing on the left image layer component object and the right image layer component object respectively includes:
[0060] r = texR.r * balance_R[1] + texR.g * balance_R[2] + texR.b * balance_R[3];
[0061] g = texR.r * balance_G[1] + texR.g * balance_G[2] + texR.b * balance_G[3];
[0062] b = texR.r * balance_B[1] + texR.g * balance_B[2] + texR.b * balance_B[3];
[0063] Wherein: r is used to indicate the filtered red channel value of a single pixel point, g is used to indicate the filtered green channel value of a single pixel point, b is used to indicate the filtered blue channel value of a single pixel point, texR.r is used to indicate the red channel value of a single pixel point before filtering, texR.g is used to indicate the green channel value of a single pixel point before filtering, texR.b is used to indicate the blue channel value of a single pixel point before filtering, balance_R[1], balance_R[2], balance_R[3], balance_G[1], balance_G[2], balance_G[3], balance_B[1], balance_B[2], balance_B[3] are respectively used to indicate the weight coefficients when RGB color filtering is performed on a single pixel point, and the value range of each weight coefficient is greater than or equal to 0 and less than or equal to 1.
[0064] Further, the process of performing RGB color fusion processing on the filtered left image layer component object and the right image layer component object comprises:
[0065] texRGB = (r1 + r2, g1 + g2, b1 + b2, 1);
[0066] Wherein: texRGB is used to indicate the RGB value of a single pixel point in the fused component object, r1 is used to indicate the red channel value of a single pixel point in the filtered left image layer component object, r2 is used to indicate the red channel value of a single pixel point in the filtered right image layer component object, g1 is used to indicate the green channel value of a single pixel point in the filtered left image layer component object, g2 is used to indicate the green channel value of a single pixel point in the filtered right image layer component object, b1 is used to indicate the blue channel value of a single pixel point in the filtered left image layer component object, and b2 is used to indicate the blue channel value of a single pixel point in the filtered right image layer component object.
[0067] The grating red and blue binocular vision output module 40 is used to output the corresponding red and blue weak binocular vision training image according to the rendering processing result of the red and blue grating data. Specifically, the structure of the grating red and blue binocular vision output module 40 is as follows: Figure 9 As shown, it includes a red and blue raster output layer creation module 41 and an output layer display synchronization module 42. The red and blue raster output layer creation module 41 is used to create a red and blue raster output layer, and the output layer display synchronization module 42 is used to synchronously display the red and blue raster output images of the left and right layers.
[0068] like Figure 10 FIG. 1 is a flow chart showing a method for converting from any application to a red-blue weak binocular vision training application according to an embodiment of the present invention. The method in this embodiment specifically includes the following steps:
[0069] Step S101: stratify each component object in the current application to be converted into left and right layers.
[0070] Step S102: Obtain the left and right layer display data caches, set the input rendering model according to the mounted raster object, and perform input settings for the red and blue raster states.
[0071] Step S103: updating the parameters of the red and blue gratings; performing three primary color filtering on the left image layer component object and the right image layer component object, and fusing the filtered left image layer component object and the right image layer component object; and cropping the fused red and blue views.
[0072] Step S104: Synchronously outputting the red and blue raster output images of the left and right layers.
[0073] It should be noted that the implementation process of the embodiment of the present invention is similar to the system for converting from any application to a red-blue weak binocular vision training application in the above embodiment, so it will not be repeated here.
[0074] The method for converting any application into a red-blue weak binocular vision training application provided by the embodiment of the present invention can be implemented on the terminal side or the server side. As for the hardware structure of the terminal for converting any application into a red-blue weak binocular vision training application, please refer to Figure 11An optional hardware structure diagram of the electronic terminal 1100 for converting any application into a red-blue weak binocular vision practicing application is provided for the embodiments of the present application. The terminal 1100 can be a mobile phone, a computer device, a tablet device, a personal digital processing device, a factory background processing device, etc. The terminal 1100 for converting any application into a red-blue weak binocular vision practicing application includes at least one processor 1101, a memory 1102, at least one network interface 1104, and a user interface 1106. The various components in the apparatus are coupled together by a bus system 1105. It can be understood that the bus system 1105 is used to realize the connection communication between the components. The bus system 1105 includes a data bus, a power supply bus, a control bus, and a status signal bus, but for the purpose of clear illustration, all the buses are marked as the bus system in Figure 11
[0075] The user interface 1106 can include a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad, or a touch screen, etc.
[0076] It can be understood that the memory 1102 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), which is used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM), synchronous static random access memory (SSRAM). The memory described in the embodiments of the present application is intended to include but not limited to these and any other suitable categories of memory.
[0077] The memory 1102 in the embodiment of the present application is used to store various categories of data to support the operation of converting any application into a red-blue weak binocular vision practice application terminal 1100. Examples of these data include: any executable programs for operating on the red-blue weak binocular vision practice application terminal 1100, such as an operating system 11021 and an application program 11022; the operating system 11021 contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 11022 can contain various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The method for converting any application into a red-blue weak binocular vision practice application provided by the embodiment of the present application can be included in the application program 11022.
[0078] The method disclosed in the above embodiment of the present application can be applied in the processor 1101 or implemented by the processor 1101. The processor 1101 can be an integrated circuit chip with a processing capability of signals. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 1101 or an instruction in the form of software. The above processor 1101 can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 1101 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiment of the present application. The general-purpose processor 1101 can be a microprocessor or any conventional processor, etc. In combination with the steps of the accessory optimization method provided by the embodiment of the present application, the hardware decoding processor can be directly embodied to complete the execution, or a combination of hardware and software modules in the decoding processor can be used to complete the execution. The software module can be located in a storage medium, which is located in the memory. The processor reads the information in the memory and combines the hardware to complete the steps of the above method.
[0079] In the exemplary embodiment, the red-blue weak binocular vision practice application terminal 1100 can be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), etc. for executing the above method.
[0080] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by computer program related hardware. The aforementioned computer program can be stored in a computer readable storage medium. The program executes the steps of the above-mentioned method embodiments when executed; and the aforementioned storage medium includes ROM, RAM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage device, flash memory, U disk, mobile hard disk, or any other medium capable of storing desired program code in the form of instructions or data structures and capable of being accessed by a computer. In addition, any connection can be appropriately referred to as a computer readable medium. For example, if the instructions are sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave is included in the definition of the medium. However, it should be understood that the computer readable storage medium and the data storage medium do not include connections, carriers, signals or other transitory media, but are intended to be directed to non-transitory, tangible storage media. As used in the application, magnetic disks and optical disks include compact disks (CD), laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, wherein magnetic disks typically magnetically copy data, and optical disks optically copy data with a laser.
[0081] In the embodiments provided in the present application, the computer readable storage medium can include read only memory, random access memory, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage device, flash memory, U disk, mobile hard disk, or any other medium capable of storing desired program code in the form of instructions or data structures and capable of being accessed by a computer. In addition, any connection can be appropriately referred to as a computer readable medium. For example, if the instructions are sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave is included in the definition of the medium. However, it should be understood that the computer readable storage medium and the data storage medium do not include connections, carriers, signals or other transitory media, but are intended to be directed to non-transitory, tangible storage media. As used in the application, magnetic disks and optical disks include compact disks (CD), laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, wherein magnetic disks typically magnetically copy data, and optical disks optically copy data with a laser.
[0082] In summary, the present application provides a method, device, terminal and medium for converting any application into a red-blue weak binocular vision practice application. The present application provides a method for improving the efficiency of converting any application into a red-blue weak binocular vision practice application. Therefore, the present application effectively overcomes the shortcomings of the prior art and has high industrial utilization value.
[0083] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical ideas disclosed in the present application should be covered by the claims of the present application.
Claims
1. A system for converting any application into a red-blue weak binocular vision training application, characterized in that: include: Initialization module, used to layer the component objects in the current application to be converted left and right; The red and blue raster data input module is used to obtain the left and right layer display data cache, set the input rendering model according to the mounted raster object, and perform the input setting of the red and blue raster status; The raster rendering data processing module is used to update the parameters of the red and blue rasters; and perform three-primary color filtering on the left image layer component object and the right image layer component object, and fuse the filtered left image layer component object and the filtered right image layer component object; And, cropping the fused red and blue views; The raster rendering data processing module includes: a red and blue binocular left and right fusion module, configured to perform the following operations on the left image layer component object and the right image layer component object: perform three-primary color RGB color filtering processing on the left image layer component object to filter out the red channel value of each pixel in each component object, and perform three-primary color RGB color filtering processing on the right image layer component object to filter out the green channel value and the blue channel value of each pixel in each component object; perform RGB color fusion processing on the filtered left image layer component object and the right image layer component object to obtain a fused red and blue view; The grating red and blue binocular vision output module is used to synchronously output the left and right red and blue grating output images.
2. The system for converting any application into a red-blue weak binocular vision training application according to claim 1, characterized in that: The initialization module includes: The component object layer initialization module is used to create the left and right layers, classify the component objects of the current application to be converted into the corresponding layers, and define the 3D layer shared by the left and right eyes; A red and blue binocular vision environment construction module is used to create and initialize a left virtual camera and a right virtual camera; Black and white raster environment building module, used to build black and white raster environment.
3. The system for converting any application to a red-blue weak binocular vision training application according to claim 2, characterized in that: The visual object component classification module is used to create a left image layer component object and a right image layer component object.
4. The system for converting any application to a red-blue weak binocular vision training application according to claim 2, characterized in that: The red and blue binocular vision environment construction module includes: A first external input parameter initialization module is used to initialize and set external input parameters; Left and right layer camera object creation module, used to create virtual camera parameters for left and right layers; Left and right camera format definition module, used to define the virtual camera formats of the left and right layers; Left and right camera display target output creation module, used to output the display target of the virtual camera; The left and right camera position initialization module is used to initialize the positions of the virtual cameras on the left and right layers; The left and right camera rendering initialization module is used to initialize the rendering of the virtual cameras of the left and right layers.
5. The system for converting any application to a red-blue weak binocular vision training application according to claim 1, characterized in that: The red and blue grating data input module includes: The left and right layer display data cache collection module is used to collect the data cache of the left and right layers; The rendering model setting module is used to set the input rendering model according to the mounted raster object; The red and blue grating status setting module is used for input setting of the red and blue grating status.
6. The system for converting any application to a red-blue weak binocular vision training application according to claim 1, characterized in that: The raster rendering data processing module includes: The red and blue grating position and status update module is used to update the position and status of the red and blue grating; The red and blue view cropping module is used to crop the fused red and blue views.
7. The system for converting any application to a red-blue weak binocular vision training application according to claim 1, characterized in that: The grating red and blue binocular vision output module includes: Red and blue raster output layer creation module, used to create red and blue raster output layer; The output layer display synchronization module is used to synchronously display the red and blue raster outputs of the left and right layers.
8. A method for converting an arbitrary image into a red-blue raster output image, characterized in that: include: Layer each component object in the current application to be converted into a left and right layer; Get the left and right layer display data cache, set the input rendering model according to the mounted raster object, and perform input settings for the red and blue raster states; Updating the parameters of the red and blue gratings; and performing three-primary color filtering on the left image layer component object and the right image layer component object, and fusing the filtered left image layer component object and the right image layer component object; And, cropping the fused red and blue views; The raster rendering data processing module includes: a red and blue binocular left and right fusion module, which is used to perform the following operations on the left image layer component object and the right image layer component object: perform three-primary color RGB color filtering processing on the left image layer component object to filter out the red channel value of each pixel in each component object, and perform three-primary color RGB color filtering processing on the right image layer component object to filter out the green channel value and the blue channel value of each pixel in each component object; perform RGB color fusion processing on the filtered left image layer component object and the right image layer component object to obtain a fused red and blue view; Synchronously output the red and blue raster output images of the left and right layers.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for converting an arbitrary image into a red-blue raster output image according to claim 8 is implemented.
10. An electronic terminal, characterized in that: include: processor and memory; The memory is used to store computer programs; The processor is configured to execute the computer program stored in the memory, so as to enable the terminal to perform the method for converting an arbitrary image into a red-blue raster output image as claimed in claim 8 .
Citation Information
Patent Citations
Naked eye 3D image printing method of clothes
CN104280887A
Amblyopia training supervision method and device, computer readable storage medium and terminal
CN113936327A