Automated UI Code Generation from Bitmaps via Computer Vision

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Developing user interface (UI) code for mobile applications is cumbersome, expensive, and error-prone, especially due to the complexity of converting conceptual drawings into UI code, which often requires multiple revisions and involves inferring hierarchical structures from bitmap images.

Innovation Solution

A method combining computer vision (CV) and optical character recognition (OCR) processes to identify and merge UI elements and text, generating a view hierarchy that conforms to the graphical representation of the UI, allowing for automatic inference of UI code from screenshots or conceptual drawings.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If manual conversion from conceptual drawings to UI code is performed, then UI code can be generated, but the process is labor-intensive, costly, and error-prone

Engineering Contradiction:
ImproveUI code generation speedVSAvoidTime required for UI development
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs self-service by automatically analyzing graphical representations and generating UI code without requiring manual intervention. The computer vision and OCR processes autonomously identify UI elements, extract text, infer hierarchical structures, and produce executable code, eliminating the need for manual conversion and significantly reducing development time and labor costs

Inventive Principle:
Principle #25Self-service

2Manufacturing precision

If multiple revisions are made during UI development, then the UI can be refined, but the process becomes more expensive and error-prone

Engineering Contradiction:
ImproveUI code accuracyVSAvoidComplexity of conversion process
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent replaces the mechanical manual process of UI code conversion with automated computer vision and OCR systems. These systems use image processing algorithms to detect UI elements, recognize text patterns, and generate code automatically, substituting human manual operations with computational processes that reduce errors and simplify the conversion workflow

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The system creates accurate copies of the visual UI representation by analyzing the graphical input and reproducing it as executable code. The computer vision process captures the structural and visual properties of UI elements, while OCR copies text content, combining them to generate faithful reproductions of the intended UI design with high accuracy

Inventive Principle:
Principle #26Copying

3Loss of information

If hierarchical structure is inferred from bitmap images, then UI structure can be recovered, but the process is complex and difficult

Engineering Contradiction:
ImproveRetention of UI structure informationVSAvoidDifficulty of structure inference
Core Design Contradiction:
Loss of informationVSDifficulty of detecting and measuring

Solution Approach 1:

The system segments the bitmap image into distinct UI elements by detecting boundaries, edges, and spatial relationships. The computer vision process divides the graphical representation into individual components such as buttons, text fields, and containers, making it easier to identify and reconstruct the hierarchical structure without the complexity of analyzing the entire image as a single unit

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transforms the two-dimensional bitmap image into a structured hierarchical representation by adding a dimensional layer of organization. The system analyzes spatial positioning, nesting relationships, and visual properties to construct a tree-like structure that represents the UI hierarchy, converting visual information into an organized data structure that is easier to process and implement

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

Data Source

PatentUS10191889B2Systems, apparatuses and methods for generating a user interface by performing computer vision and optical character recognition on a graphical representation
Publication Date: 2019.01.29 BOARD OF RGT THE UNIV OF TEXAS SYST
  • US10191889B2 patent drawing
  • US10191889B2 patent drawing
  • US10191889B2 patent drawing

AI summary

Systems, apparatuses and methods for generating a graphical user interface (GUI) conforming to a graphical representation employ computer vision, optical character recognition, and other techniques to generate a structure of the GUI as a view hierarchy. A development project with source code and resource files is created to generate an application having the GUI. The application and GUI are applicable to mobile and other platforms using various operating systems, such as Android®, iOS®, and others.