PANBLUR

IMAGE HALFTONE INTERFACE

The program took the brightness value from the imported images and created a horizontal curve-gradient offset based on the combination of tracker and brightness deviations. Moving the tracker and heighten the offset of brightness values. All codes were written in to the global section in the same C# component.
KEYWORDS
proceedings; imaging; design computation; parametric design; digital media; user interface; interactive design; data visualization; digital modeling; digital fabrication; motion graphics

IMAGE PROCESSING

‍

1    CONCEPT

The concept of the program lies on image halftone procedure. The desire outcome of the program should be a reconstruction of the image structure.

1.1    Sketching in p5.js and grasshopper

Initial idea of the program is related to image tone, hue, and brightness changes.

Figure 1: Brightness reconstruction  into vector cloud
Figure 2: Brightness reconstruction  into continuous line

1.2     Variable | Code

Image
Variation Type
size X
size Y
Creates different width, height and half-tone value
Image width (multiplier)
Tracker X and Tracker Y
Horizontal Offset
Image height (multiplier)
Location of Tracker creates deviation for halftone value
Shifts vertical alignment of halftone strips
Variable Name

private void RunScript(string imageFile, double pointX, double pointY, double sizeX, double sizeY, double shift, Point3d localpoint, ref object B, ref object C){
//................................load image
            System.Drawing.Bitmap mybmp = new System.Drawing.Bitmap(imageFile);

//................................image resolution
            int rx = (mybmp.Width - 2);
            int ry = (mybmp.Height - 2);

//.................................intialize storage lists
            List<system.drawing.color> colors = new List<system.drawing.color>();</system.drawing.color></system.drawing.color>

            List<point3d> pt = new List<point3d>();</point3d></point3d>
            for (int j = 0; j < ry; j = j + 2) {
                        for(int i = 0; i < rx; i++) {
                                    System.Drawing.Color c = mybmp.GetPixel(i, ry - j);
                                    double val = c.GetBrightness();
                                    double closerange = (Math.Pow(i - pointX, 2) + Math.Pow(j - pointY, 2));
                                    double blubx = j + val + 30 / closerange;
                                    pt.Add(new Point3d(i, blubx, 0.0));
                        }
                        for(int i = rx - 1; i > -1; i--) {
                                    System.Drawing.Color c = mybmp.GetPixel(i, ry - j - 1);
                                    double val = c.GetBrightness();
                                    double closerange = (Math.Pow(i - pointX, 2) + Math.Pow(j - pointY + 2, 2));
                                    double bluby = j + shift + val + 30 / closerange;
                                    pt.Add(new Point3d(i, bluby, 0.0));
                        }
                        for(int i = 0; i < rx; i++) {
                                    System.Drawing.Color c = mybmp.GetPixel(i, ry - j);
                                    double val = c.GetBrightness();
                                    double closerange = (Math.Pow(i - pointX, 2) + Math.Pow(j - pointY, 2));
                                    double blubx = j - val - 30 / closerange;
                                    pt.Add(new Point3d(i, blubx, 0.0));
                        }
                        for(int i = rx - 1; i > -1; i--) {
                                    System.Drawing.Color c = mybmp.GetPixel(i, ry - j - 1);
                                    double val = c.GetBrightness();
                                    double closerange = (Math.Pow(i - pointX, 2) + Math.Pow(j - pointY + 2, 2));
                                    double bluby = j + shift - val + 30 / closerange;
                                    pt.Add(new Point3d(i, bluby, 0.0));
                        }
            }
Curve crv = Curve.CreateInterpolatedCurve(pt, 3);
B = crv;

Figure 3: Adaptive halftone to user input

Yiqi, designer, technologist, artist.

about ME
CONTACT ME
⇑ TOPBACK TO WORKS


Have a good day !
HOME
Contacts
WA, USA
vanyiqi@gmail.com
sirrandom
Follow
/Long dream stretches, because of you.
Copyright © 2022 Yiqi Zhao. All rights reserved. 0_0