Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

ROBOTIC PROCESS AUTOMATION

CAPSTONE PROJECT REPORT

SUBMITTED BY:

Aisiri Hegde - aisirih.bcom21@rvu.edu.in


Meghana M - meghanam.bcom21@rvu.edu.in

SUBMITTED TO:

Prof. Manjul Krishna Gupta

SUBMITTED ON:

Dec 3, 2023
Introduction
The capstone project aimed to explore the creative potential of UiPath by automating the process
of sketch generation on MS Paint. Traditionally associated with business process automation,
UiPath's application in creative workflows was the focal point of this project.

Project Overview
Type 1:
Project Components

Sequence 1: Setup
The initial sequence focused on configuring the environment for sketch generation. This
involved a series of essential steps:

1. Assign Activities:
a. The project was initiated by defining the height and width parameters, crucial for
establishing the dimensions of the digital canvas.
b. A bitmap variable was assigned to represent the virtual canvas on MS Paint.
2. Add Data Column:
a. To organize the sketching process, a data column was added to store the
coordinate values of the picture. This structured approach ensured a systematic
workflow.
3. While Loop:
a. A while loop was employed to iteratively gather coordinate values. This loop
continued until the sketch was considered complete, allowing for flexibility and
adaptability in the sketching process.
4. Write Range:
a. The gathered coordinate values were then systematically written to a specified
range. This step was crucial for accuracy, ensuring that the UiPath automation
accurately replicated the intended sketch on the canvas.

Sequence 2: Drawing Sketch


The second sequence delved into the actual sketching process. Key activities included:
1. Open Application:
a. UiPath seamlessly interacted with MS Paint by utilizing the "Open Application"
activity. This set the stage for the subsequent sketching actions.

1
2. For Each Row in Data Table:
a. Iterating through the data table containing coordinate values allowed for a
dynamic and adaptive approach to the sketching process. Each row represented a
step in the sketching sequence.
3. Assign and If Activities:
a. The project utilized "Assign" activities to dynamically set cursor positions based
on the coordinate values stored in the data table.
b. An "if" condition ensured precision by validating the cursor position before
initiating the sketching action.
4. Click Activity:
a. The culmination of the sketching process was the "Click" activity, simulating the
drawing action on the canvas. This step encapsulated the creative essence of the
project.

Project Outcome
The automated sketch generation process yielded positive outcomes, showcasing the successful
integration of UiPath with MS Paint for creative automation. The evaluation of outcomes was
multi-faceted:

1. Accuracy of Sketches:
a. Automated sketches were evaluated for accuracy and consistency, comparing
favorably with manually drawn sketches.
2. Efficiency of Automation:
a. The time taken for UiPath sketching was measured and compared with manual
drawing, revealing efficiency gains through automation.
3. Comparison with Manual Sketches:
a. A comparative analysis with manually drawn sketches provided insights into the
parity achieved between human and automated creative processes.

2
Workflow:

3
4
5
6
Used cases:

7
Type 2(Without the use of the write range activity):

Project Methodology:

This requires Installation of the package- UiPath.Bitmap.SketchActivities

1. Image Preprocessing

● Image Loading: The input bitmap image is loaded into the UiPath workflow using the
Image.LoadFromBitmap activity. This activity takes the path to the image file as input
and returns an Image object.

● Image Information Extraction: The workflow extracts essential information from the
image, such as its height and width, using the Image.GetHeight and Image.GetWidth
activities, respectively. This information is used to iterate through the image pixels in the
subsequent steps.

2. Sketch Generation Algorithm

● Pixel-Level Analysis: The workflow iterates through each pixel of the image, retrieving
its RGB values using the Image.GetPixel activity. The RGB values represent the intensity
of red, green, and blue components of the pixel's color.
● Sketch Pixel Identification: For each pixel, the workflow checks if the RGB values
correspond to black color. The threshold values used for black detection are R < 100, G <
100, and B < 100. If the pixel is considered black, its coordinates (x, y) are stored in a
collection, such as a list.
● Sketch Pixel Ordering: The collection of black pixel coordinates is sorted based on their
x and y coordinates to ensure that the sketch is drawn in a consistent order, from left to
right and top to bottom.

3. Sketch Rendering in MS Paint

● MS Paint Activation: The workflow activates the MS Paint application window using
the UiPath.Application.Start activity. This ensures that the subsequent mouse clicks are
directed to the MS Paint window.

● Sketch Drawing: The workflow iterates through the collection of ordered black pixel
coordinates. For each pixel, the workflow simulates a mouse click in MS Paint at the
corresponding coordinates using the Mouse.Click activity. This activity takes the

8
OffsetX and OffsetY attributes to specify the exact position of the click within the MS
Paint window.

4. Error Handling and Robustness

● Input Validation: The workflow includes validation checks to ensure that the input
image file exists and is a valid bitmap format. This prevents errors due to invalid input
data.
● Exception Handling: The workflow incorporates exception handling mechanisms to
catch and handle unexpected errors that may occur during the execution of the sketch
generation process.
● Image Size Adaptation: The workflow can be adapted to handle images of different
sizes by adjusting the iteration loop limits and mouse click offsets accordingly.

Results

The UiPath workflow successfully converts bitmap images into sketches using MS Paint. The
generated sketches accurately capture the essential features of the original images while
maintaining a simplified artistic representation. The workflow is robust and can handle a variety
of image sizes and complexities

Workflow:

9
10
11
12
13
Used cases:

14
Conclusion
In conclusion, this capstone project demonstrated the versatility of UiPath in non-traditional
domains, emphasizing its adaptability in creative workflows. The successful automation of
sketch generation on MS Paint showcased the tool's potential in enhancing and augmenting
artistic processes. The project not only achieved its objectives but also opened avenues for future
improvements and creative automation possibilities. The fusion of technology and creativity
exemplified in this project contributes to the broader discourse on the role of automation in
artistic endeavors.

15

You might also like