1 / 5

Multimedia Security

Custom Profile Plot. Multimedia Security. 指導老師:黃文楨. 學生:葉博涵 9724823. 目的. Draws a line profile using getPixel() to get the pixels values along the line. CODE. getLine(x1, y1, x2, y2, width); if (x1==-1) exit("Line selection required");

flynn-silva
Download Presentation

Multimedia Security

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Custom Profile Plot Multimedia Security 指導老師:黃文楨 學生:葉博涵 9724823

  2. 目的 • Draws a line profile using getPixel() to get the pixels values along the line.

  3. CODE getLine(x1, y1, x2, y2, width); if (x1==-1) exit("Line selection required"); values = getLineValues(x1, y1, x2, y2); Plot.create("Profile Plot", "X", "Values", values); function getLineValues(x1, y1, x2, y2) { dx = x2-x1; dy = y2-y1; n = round(sqrt(dx*dx + dy*dy)); xinc = dx/n; yinc = dy/n; n++; values = newArray(n); i = 0; do { values[i++] = getPixel(x1,y1); x1 += xinc; y1 += yinc; } while (i<n); return values; }

  4. CODE getLine(x1, y1, x2, y2, width); … if (x1==-1) exit("Line selection required"); … values = getLineValues(x1, y1, x2, y2); … Plot.create("Profile Plot", "X", "Values", values);…

  5. THE END

More Related