reverse engineering of graphs: reading data points from scatterplots maya wei

18
Reverse Engineering of Reverse Engineering of Graphs: Reading Data Graphs: Reading Data Points from Scatterplots Points from Scatterplots Maya Wei Maya Wei

Upload: harvey-joseph

Post on 18-Jan-2018

217 views

Category:

Documents


0 download

DESCRIPTION

Aim To develop a program that can accurately read data points from a graph.To develop a program that can accurately read data points from a graph. Would return: (1,1), (2,2), (3,3), (4,4), (5,5)

TRANSCRIPT

Page 1: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Reverse Engineering of Reverse Engineering of Graphs: Reading Data Points Graphs: Reading Data Points

from Scatterplotsfrom Scatterplots

Maya WeiMaya Wei

Page 2: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Purpose?Purpose?Graphs are a visual Graphs are a visual method of displaying data.method of displaying data.

What happens if you no What happens if you no longer can find the original longer can find the original data, but are only left with data, but are only left with an image? an image?

Mathematical Mathematical manipulation in purely a manipulation in purely a visual representation is visual representation is highly slim.highly slim.

Forecasts Made During Solar StormsDay One

0

10

20

30

40

50

60

70

80

90

0 10 20 30 40 50 60 70 80 90 100

Page 3: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

AimAim• To develop a program that can To develop a program that can

accurately read data points from a accurately read data points from a graph.graph.

Would return:Would return:(1,1), (2,2), (3,3), (4,4), (5,5)(1,1), (2,2), (3,3), (4,4), (5,5)

Page 4: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

PrecedentsPrecedents• Image Analysis:Image Analysis:

– Edge DetectionEdge Detection– Shape DiscernmentShape Discernment

• Application of Basic TechniquesApplication of Basic Techniques

Page 5: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Graph, Graph, created in created in OpenOffice OpenOffice CalcCalc

Will identify Will identify edgesedges

Given that edges Given that edges identified, divide identified, divide edges into edges into number, axis, and number, axis, and pointpoint

DevelopmentDevelopment

Will show point in Will show point in relation to axesrelation to axesRadio Buttons are Love Radio Buttons are Love

<3<3

Page 6: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Timeline (Quarter 1)Timeline (Quarter 1)

Properly Display Properly Display Images / Read Images / Read Images in Images in PixelGrabber – 3 PixelGrabber – 3 WeeksWeeks

Change to Change to BufferedImage, create BufferedImage, create graphgraph

Graph modifications, Graph modifications, reading pixels, edge reading pixels, edge detectiondetection

GUI CreationGUI Creation

Page 7: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Timeline (Quarter 2)Timeline (Quarter 2)

GUI GUI modificationmodification

Identifying connected Identifying connected points, playing with data points, playing with data storage format – change storage format – change to to ArrayList<ArrayList<int[]ArrayList<ArrayList<int[]>>>>

Further GUI Further GUI modification, modification, addition of radio addition of radio buttonsbuttons

Identification – Identification – Axes, Points; Axes, Points; Axis Axis identification identification refinedrefined

Page 8: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Development and DisplayDevelopment and Display• Written in JavaWritten in Java• JPanelJPanel• BorderLayoutBorderLayout• JButtons in GridLayoutJButtons in GridLayout• Images in JLabel with ImageIconImages in JLabel with ImageIcon• JRadioButton \o/JRadioButton \o/

Page 9: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

GraphGraph• PNG imagePNG image• BufferedImageBufferedImage

– Can manipulate pixels easilyCan manipulate pixels easily– Alternative PixelGrabberAlternative PixelGrabber

• Modifying images difficult hereModifying images difficult here• Background color same as point (0,0)Background color same as point (0,0)• No guidelinesNo guidelines• MinimalistMinimalist

Page 10: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Edge DetectionEdge Detection• Highly primitiveHighly primitive• Takes point, backgroundTakes point, background• Are the point’s surrounding colors Are the point’s surrounding colors

the same as the background colors?the same as the background colors?• If one yes, then it’s an edge.If one yes, then it’s an edge.

Page 11: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Edge Detection -- ProblemsEdge Detection -- Problems• Doesn’t take into account diagonalDoesn’t take into account diagonal• Based on assumption that Based on assumption that

background is same as (0, 0)background is same as (0, 0)• Assumption that colors are Assumption that colors are

consistent (not one shade off consistent (not one shade off background)background)

Page 12: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

EdgesEdges

Orange are Orange are edges; edges; many many different different items items orangeorange

Page 13: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Connected PointsConnected Points• Using do-while loopUsing do-while loop• Searches through list of edge points Searches through list of edge points

to find the neighboring edge pointsto find the neighboring edge points• Adds onto arrayList, repeatsAdds onto arrayList, repeats• Primitive method, using anything Primitive method, using anything

advanced like iterators would cause advanced like iterators would cause an erroran error

Page 14: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

IdentificationIdentification• AxesAxes

Page 15: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

ExtendedExtended• Visual displayVisual display

Page 16: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Further WorkFurther Work• Identifying scale (fun stuff)Identifying scale (fun stuff)• Re-working GUIRe-working GUI

– Currently, “Extend” creates whole new Currently, “Extend” creates whole new image, work to get it to extend on image image, work to get it to extend on image already givenalready given

• Use of other graphsUse of other graphs

Page 17: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Learned?Learned?• Details have yet to be worked out, Details have yet to be worked out,

but the base is very much there. but the base is very much there. Scale will be the largest challenge.Scale will be the largest challenge.

• Forwards and onwards to the next Forwards and onwards to the next large adventure! (2large adventure! (2ndnd Quarter) Quarter)

Page 18: Reverse Engineering of Graphs: Reading Data Points from Scatterplots Maya Wei

Cheers!Cheers!

\o/\o/

<3<3