You are on page 1of 3

Synthetic Curve Data Creator

Neilmer E. Lahoylahoy
Department of Electrical Engineering and Technology
College of Engineering and Technology
Mindanao State University - Iligan Institute of Technology
Iligah City, Philippines
neilmer.lahoylahoy@g.msuiit.edu.ph

Abstract—This document is able to solve given synthetic data, on original image. There are three channels on rgb image. The
mainly a curve using MATLAB. A function that can describe first page of an rgb image is the red channel, next is green and
characteristics of the curve, y values depending on x value along lastly the blue one. In the program I prefer the green channel
with its specifications. The program enables to display original
image, binary or gray scale image and the re-scale image with the or second one, which makes the segmentation process easy
dimension stated by the user. Synthetic curve data creator solves and to decrease the computational time [1].
and displays single column vector with ”n” rows of y-values.
Index Terms—MATLAB, algorithm, synthetic curve data

I. I NTRODUCTION
Synthetic data defines a statistical data that artificially
manufactured rather than measured in real events. Consider
a given curve from a black and white image. This curve will
be converted to gray scale image, cropping the image specified
by the user and getting its data points.
II. F ORMULATION
Creating a MATLAB function that generates synthetic curve
data from a black and white image file that describes the
characteristic of the curve along with x-y values where the
data curves detect.
The program requires input image specifically png. The
imread function reads a greyscale (png) image. Tells the user
to input ’n’ numbers of data points along x-axis, maximum
and minimum of data points on y-axis.

Fig. 2. Synthetic Curve Data

The image is being set to full screen by this command.

set(gcf,0 U nits0 ,0 N ormalized0 ,0 Outerposition0 , [0, 0, 1, 1]);


Fig. 1. Dimension inputs, Read greyscale image, Font size
(2)
On Fig. 2 shows the original curve data. Getting the dimen-
sions of the image, numberOfColorBands should be equals to
3. That is
[rows, columns, numberOf ColorBands] = size(rgbImage)
(1)
. This image is then convert to grayscale(rgb2gray) as we
see on Fig. 3. Note that the dimension of Fig. 2 is still the same Fig. 3. Title Image Code
It is advantageous to specify the output image. In this I can have two possible values for each pixels. Data Matrix symbol
directly tell their differences. are rectangular, usually square ”cells” which represents a bit.
Depending on a coding used, a ”light” cell represents 0 and a
”dark” cell is a 1, or vise versa. [3]
Cropping the image/data for unnecessary edges. This max-
imize the column in the matrix represents one data.

Fig. 6. Cropped Image

Finding the baseline:


Fig. 4. Input Xn, Ymax-Ymin

The program runs automatically when you click the ’run


button” Fig.3. By the str2double (Fig.1), converts the input
text into double precision values, which means str can be a Fig. 7. Baseline
character vector, a cell or string array. It also contains text that
represents real or complex numerical values [2] Lastly, Scanning across columns finding where the top of
the hump is

Fig. 8. Scanning Top Hump

A. Figures and Tables


TABLE1 Shows the x and y coordinates of the given
image. The points on the graph are based on the output vector
with ”n” rows of y-values. Top-down right-lef, the sequence
of the y value data. The maximum y-axis points/data in the
graph depends on input maximum value. As we set the ymax
equals 400, so the highest data points is closer to 400, that is
399, (x,y)=(285,399). The starting data points on the graph is
(1,175) and the last number is (500,234). It justify the output
figure Fig.9.
Fig. 5. Binary Image
The data points is always dependent on the given measure-
Black and white two-dimensional image arrange in curve ments. If the user wants to be precise or approximate its output
pattern represents converted binary image, thus in order to data.
TABLE I
N UMBER OF ROWS IN Y-VALUES

X-Y X -Y X-Y X-Y


1 175.0 63 230.0 125 286.0 303 234
3 177.2 66 232.8 129 2290.6 306 234
6 180.8 69 235.2 132 293.0 317 234
9 184.0 72 238.6 139 303.0 328 234
12 188.0 75 241.8 146 311.0 334 234
15 191.6 78 244.6 151 316.0 344 234
18 194.6 81 247.2 161 328.0 349 234
21 197.8 84 250.0 178 357.0 357 234
24 200.2 87 252.2 181 360.0 366 234
27 201.8 90 253.8 191 366.0 372 234
30 203.8 93 256.4 209 374.0 384 234
33 206.2 96 259.6 211 375.0 389 234
36 209.0 99 262.2 229 383.4 396 234
39 211.4 102 265.0 234 385.0 404 234
42 213.4 105 267.6 249 390.0 418 234
45 215.4 109 271.0 253 391.0 440 234
48 217.4 112 273.0 266 395.0 484 234
51 219.4 114 274.4 272 397.0 500 234
54 222.0 117 277.0 277 398.0
57 224.6 120 280.0 285 399.0
60 227.2 123 283.6 297 394.0

Fig. 9. Output

C ONCLUSION
The program is able to solve, calculate and display any type
of synthetic curve image input. Output image with its specific
matrix data.
R EFERENCES
[1] shodhganga.inflibnet.ac.in ¿ bitstream
[2] mathworks.com
[3] Stevenson, Rick (December 2005). ”Laser Marking Matrix Codes on
PCBs” (PDF). Printed Circuit Design and Manufacture. Retrieved 31
May 2007.

You might also like