Submit Search
Upload
Homework7補充教學
•
Download as PPTX, PDF
•
0 likes
•
407 views
Jessica Hsieh
Follow
Computer Programming, Fall 2014, Taipei Tech Homework 7 Problem 2
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 10
Download now
Recommended
Func diff cal_exercise2-3
Func diff cal_exercise2-3
Alisha Smile
Python differential equation
Python differential equation
hungchiayang1
Ppt 26-50
Ppt 26-50
hungchiayang1
Ppt 167-173
Ppt 167-173
hungchiayang1
Polar example
Polar example
Alisha Smile
Ppt 1-25
Ppt 1-25
hungchiayang1
Ppt 78-100
Ppt 78-100
hungchiayang1
Ch3 教學
Ch3 教學
hungchiayang1
Recommended
Func diff cal_exercise2-3
Func diff cal_exercise2-3
Alisha Smile
Python differential equation
Python differential equation
hungchiayang1
Ppt 26-50
Ppt 26-50
hungchiayang1
Ppt 167-173
Ppt 167-173
hungchiayang1
Polar example
Polar example
Alisha Smile
Ppt 1-25
Ppt 1-25
hungchiayang1
Ppt 78-100
Ppt 78-100
hungchiayang1
Ch3 教學
Ch3 教學
hungchiayang1
Python p.193 197
Python p.193 197
hungchiayang1
Ppt 136-136
Ppt 136-136
hungchiayang1
Ppt 1-50
Ppt 1-50
hungchiayang1
Ppt 51-77
Ppt 51-77
hungchiayang1
Sym py edu
Sym py edu
Alisha Smile
Python9-3
Python9-3
ssuserd52ac2
Ppt 120-126
Ppt 120-126
hungchiayang1
Taylor example
Taylor example
Alisha Smile
Ppt 127-135
Ppt 127-135
hungchiayang1
Ppt 78-100
Ppt 78-100
hungchiayang1
Ppt 138-142
Ppt 138-142
hungchiayang1
Tcl tk_科技啟蒙
Tcl tk_科技啟蒙
Nick Chi
Ch2 習題
Ch2 習題
hungchiayang1
Ch4 習題
Ch4 習題
hungchiayang1
Ch2 教學
Ch2 教學
hungchiayang1
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
YKLee3434
Python匯出入csv以及繪製圖表初稿
Python匯出入csv以及繪製圖表初稿
jiannrong
Python 温故
Python 温故
勇浩 赖
Python 于 webgame 的应用
Python 于 webgame 的应用
勇浩 赖
基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计
Hengyi
教青少年寫程式
教青少年寫程式
Renyuan Lyu
數位出版2.0 it
數位出版2.0 it
志賢 黃
More Related Content
What's hot
Python p.193 197
Python p.193 197
hungchiayang1
Ppt 136-136
Ppt 136-136
hungchiayang1
Ppt 1-50
Ppt 1-50
hungchiayang1
Ppt 51-77
Ppt 51-77
hungchiayang1
Sym py edu
Sym py edu
Alisha Smile
Python9-3
Python9-3
ssuserd52ac2
Ppt 120-126
Ppt 120-126
hungchiayang1
Taylor example
Taylor example
Alisha Smile
Ppt 127-135
Ppt 127-135
hungchiayang1
Ppt 78-100
Ppt 78-100
hungchiayang1
Ppt 138-142
Ppt 138-142
hungchiayang1
Tcl tk_科技啟蒙
Tcl tk_科技啟蒙
Nick Chi
Ch2 習題
Ch2 習題
hungchiayang1
Ch4 習題
Ch4 習題
hungchiayang1
Ch2 教學
Ch2 教學
hungchiayang1
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
YKLee3434
What's hot
(16)
Python p.193 197
Python p.193 197
Ppt 136-136
Ppt 136-136
Ppt 1-50
Ppt 1-50
Ppt 51-77
Ppt 51-77
Sym py edu
Sym py edu
Python9-3
Python9-3
Ppt 120-126
Ppt 120-126
Taylor example
Taylor example
Ppt 127-135
Ppt 127-135
Ppt 78-100
Ppt 78-100
Ppt 138-142
Ppt 138-142
Tcl tk_科技啟蒙
Tcl tk_科技啟蒙
Ch2 習題
Ch2 習題
Ch4 習題
Ch4 習題
Ch2 教學
Ch2 教學
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
Photoshop 的色階與曲線調整 Levels and curve Adjustment in Photoshop
Similar to Homework7補充教學
Python匯出入csv以及繪製圖表初稿
Python匯出入csv以及繪製圖表初稿
jiannrong
Python 温故
Python 温故
勇浩 赖
Python 于 webgame 的应用
Python 于 webgame 的应用
勇浩 赖
基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计
Hengyi
教青少年寫程式
教青少年寫程式
Renyuan Lyu
數位出版2.0 it
數位出版2.0 it
志賢 黃
图形学讲义
图形学讲义
guest829549204
給軟體工程師的不廢話 R 語言精要班
給軟體工程師的不廢話 R 語言精要班
台灣資料科學年會
MapReduce 簡單介紹與練習
MapReduce 簡單介紹與練習
孜羲 顏
漫談 Source Control Management
漫談 Source Control Management
Wen-Shih Chao
Learning python in the motion picture industry by will zhou
Learning python in the motion picture industry by will zhou
Will Zhou
R統計軟體 -安裝與使用
R統計軟體 -安裝與使用
Person Lin
程式人雜誌 -- 2013年5月號
程式人雜誌 -- 2013年5月號
鍾誠 陳鍾誠
数据处理算法设计要点
数据处理算法设计要点
thinkinlamp
getPDF.aspx
getPDF.aspx
byron zhao
getPDF.aspx
getPDF.aspx
byron zhao
R統計軟體簡介
R統計軟體簡介
Person Lin
Introduction to corona sdk
Introduction to corona sdk
馬 萬圳
Python story
Python story
small fish
Metro Style Apps from C++ Developers' View
Metro Style Apps from C++ Developers' View
Eric ShangKuan
Similar to Homework7補充教學
(20)
Python匯出入csv以及繪製圖表初稿
Python匯出入csv以及繪製圖表初稿
Python 温故
Python 温故
Python 于 webgame 的应用
Python 于 webgame 的应用
基于嵌入式系统的Avs P10编码系统设计
基于嵌入式系统的Avs P10编码系统设计
教青少年寫程式
教青少年寫程式
數位出版2.0 it
數位出版2.0 it
图形学讲义
图形学讲义
給軟體工程師的不廢話 R 語言精要班
給軟體工程師的不廢話 R 語言精要班
MapReduce 簡單介紹與練習
MapReduce 簡單介紹與練習
漫談 Source Control Management
漫談 Source Control Management
Learning python in the motion picture industry by will zhou
Learning python in the motion picture industry by will zhou
R統計軟體 -安裝與使用
R統計軟體 -安裝與使用
程式人雜誌 -- 2013年5月號
程式人雜誌 -- 2013年5月號
数据处理算法设计要点
数据处理算法设计要点
getPDF.aspx
getPDF.aspx
getPDF.aspx
getPDF.aspx
R統計軟體簡介
R統計軟體簡介
Introduction to corona sdk
Introduction to corona sdk
Python story
Python story
Metro Style Apps from C++ Developers' View
Metro Style Apps from C++ Developers' View
More from Jessica Hsieh
Hw12#5
Hw12#5
Jessica Hsieh
10401_206296_Hw12
10401_206296_Hw12
Jessica Hsieh
10401_206296_Hw11
10401_206296_Hw11
Jessica Hsieh
10401_206296_Hw9
10401_206296_Hw9
Jessica Hsieh
10401_206296_Hw8
10401_206296_Hw8
Jessica Hsieh
10401_206296_Hw7
10401_206296_Hw7
Jessica Hsieh
10401_206296_Hw6
10401_206296_Hw6
Jessica Hsieh
10401_206296_Hw4&5
10401_206296_Hw4&5
Jessica Hsieh
10401_206296_Hw2
10401_206296_Hw2
Jessica Hsieh
10401_206296_Hw1
10401_206296_Hw1
Jessica Hsieh
More from Jessica Hsieh
(10)
Hw12#5
Hw12#5
10401_206296_Hw12
10401_206296_Hw12
10401_206296_Hw11
10401_206296_Hw11
10401_206296_Hw9
10401_206296_Hw9
10401_206296_Hw8
10401_206296_Hw8
10401_206296_Hw7
10401_206296_Hw7
10401_206296_Hw6
10401_206296_Hw6
10401_206296_Hw4&5
10401_206296_Hw4&5
10401_206296_Hw2
10401_206296_Hw2
10401_206296_Hw1
10401_206296_Hw1
Homework7補充教學
1.
Homework#7 Problem 2
補充教學 Computer Programming, Fall 2014, Taipei Tech EECS 1
2.
題目要求 180° Computer
Programming, Fall 2014, Taipei Tech EECS 2
3.
小提醒 • PPM檔windows沒有內建打得開的軟體喔~
• 老師的PDF有可以打開PPM檔的程式連結 • IrfanView免安裝任意門: • http://www.azofreeware.com/2012/03/irfanview-432.html Computer Programming, Fall 2014, Taipei Tech EECS 3
4.
什麼是PPM? • 不是化學濃度單位XD
• PPM是一種圖片格式,常見類型為24位RGB二進制保存 Computer Programming, Fall 2014, Taipei Tech EECS 4
5.
PPM(Portable PixMap) •
PPM,其實就是把每一個點的RGB分別保存起來。所以,PPM格式的 文件是沒有壓縮的,相對比較大,但是由於圖片格式簡單,一般作為圖 片處理的中間文件(不會丟失文件信息),或者作為簡單的圖片格式保 存。 Computer Programming, Fall 2014, Taipei Tech EECS 5
6.
PPM格式分析 • 第一部分是文件magic
number • 第二部分是圖像寬度和高度(空格隔開) • 第三部分是描述像素的最大顏色組成(0-255) Computer Programming, Fall 2014, Taipei Tech EECS 6
7.
255 0 0
0 255 0 0 0 255 255 255 0 255 255 255 0 0 0 0 1 2 0 1 Array長這樣: (unsigned char array[2*3*3] ) 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 255 0 0 0 255 0 0 0 255 255 255 0 255 255 255 0 0 0 所以當我要抓第2行第1個(1, 0)像素=> array[1*3*3] 抓座標在(x, y)的像素=> array[(x*圖片寬度+y)*3] Computer Programming, Fall 2014, Taipei Tech EECS 7
8.
string.h memmove() •
以下程式從字元陣列t 拷貝6 個字元替換字元 陣列s 前端的6 個字元 • #include <stdio.h> • #include <string.h> • int main(void) • { • char s[20] = "out of work"; • char t[20] = "future"; • memmove(s, t, 6); • printf("%sn", s); • return 0; • } Computer Programming, Fall 2014, Taipei Tech EECS 8
9.
temp = (unsigned
char *)malloc(w*h*3); for(i = 0;i < h/2;i++) { memmove(temp, &image[i*w*3], sizeof(unsigned char)*w*3); memmove(&image[i*w*3], &image[(h-i-1)*w*3], sizeof(unsigned char)*w*3); memmove(&image[(h-i-1)*w*3], temp, sizeof(unsigned char)*w*3); } 水平 鏡像 Computer Programming, Fall 2014, Taipei Tech EECS 9
10.
• 可是題目要的是旋轉180°欸…… •
水平鏡像翻轉之後再做垂直鏡像翻轉就成功啦~~~ Computer Programming, Fall 2014, Taipei Tech EECS 10
Download now