1. 編寫M程序,利用圖像點運算的線性函數:G = aF + b, 給出a、b的不同值,改變圖像的對比度、亮度以及圖像反相的效果。 2. 利用“二值圖像與原圖像做點乘,得到子圖像”的原理.,編寫M程序,構造特殊的二值圖像,最終得到需要的子圖像。 3. 編寫M程序,實現兩個大小不同圖像的疊加。 4,(提高題)編寫M程序,實現圖像的動態平移。
上傳時間: 2017-05-10
上傳用戶:mouroutao
1. 在MATLAB中,分別對灰度圖、真彩色圖、索引彩色圖,實現圖像的讀入、顯示等功能。 2. 將真彩色圖、索引彩色圖轉為灰度圖,并保存到硬盤自己的文件夾下。 3. 如果按下面的操作讀入索引彩色圖像,請說明X、MAP兩個矩陣中是如何保留圖像中RGB彩色信息的。 [X,MAP]=imread(‘文件名’,‘格式’); 答:代碼中X為讀出的圖像數據,MAP為顏色表數據(或稱調色板,亦即顏色索引矩陣,對灰度圖像和RGB彩色圖像,該MAP為空矩陣)。一幅像素為m*n的RGB彩色圖像(m,n為正整數,分別表示圖像的高度和寬度),可以用m*n*3的矩陣來形容,3層矩陣中的每一個元素對應紅、綠、藍的數值,紅綠藍是三原色,可以組合出所有的顏色。 4,(提高題)實現真彩色圖像的讀入,請分R、G、B三個通道分別顯示該圖像的紅、綠、藍色圖像。
上傳時間: 2017-05-10
上傳用戶:mouroutao
題目:古典問題:有一對兔子,從出生后第3個月起每個月都生一對兔子,小兔子長到第三個月后每個月又生一對兔子,假如兔子都不死,問每個月的兔子總數為多少? //這是一個菲波拉契數列問題 public class lianxi01 { public static void main(String[] args) { System.out.println("第1個月的兔子對數: 1"); System.out.println("第2個月的兔子對數: 1"); int f1 = 1, f2 = 1, f, M=24; for(int i=3; i<=M; i++) { f = f2; f2 = f1 + f2; f1 = f; System.out.println("第" + i +"個月的兔子對數: "+f2); } } } 【程序2】 題目:判斷101-200之間有多少個素數,并輸出所有素數。 程序分析:判斷素數的方法:用一個數分別去除2到sqrt(這個數),如果能被整除, 則表明此數不是素數,反之是素數。 public class lianxi02 { public static void main(String[] args) { int count = 0; for(int i=101; i<200; i+=2) { boolean b = false; for(int j=2; j<=Math.sqrt(i); j++) { if(i % j == 0) { b = false; break; } else { b = true; } } if(b == true) {count ++;System.out.println(i );} } System.out.println( "素數個數是: " + count); } } 【程序3】 題目:打印出所有的 "水仙花數 ",所謂 "水仙花數 "是指一個三位數,其各位數字立方和等于該數本身。例如:153是一個 "水仙花數 ",因為153=1的三次方+5的三次方+3的三次方。 public class lianxi03 { public static void main(String[] args) { int b1, b2, b3;
上傳時間: 2017-12-24
上傳用戶:Ariza
#include<stdio.h> #include<windows.h> int xuanxiang; int studentcount; int banjihao[100]; int xueqihao[100][10]; char xm[100][100]; int xuehao[100][10]; int score[100][3]; int yuwen; int shuxue[000]; int yingyu[100]; int c[100]; int p; char x[1000][100]="",y[100][100]="";/*x學院 y專業 z班級*/ int z[100]; main() { void input(); void inputsc(); void alter(); void scbybannji(); printf("--------學生成績管理-----\n"); printf("請按相應數字鍵來實現相應功能\n"); printf("1.錄入學生信息 2.錄入學生成績 3.修改學生成績\n"); printf("4.查詢學生成績 5.不及格科目及名單 6.按班級輸出學生成績單\n"); printf("請輸入你要實現的功能所對應的數字:"); scanf("%d",&xuanxiang); system("cls"); getchar(); switch (xuanxiang) { case 1:input(); case 2:inputsc(); case 3:alter(); /*case 4:select score(); case 5:bujigekemujimingdan();*/ case 6:scbybanji; } } void input() { int i; printf("請輸入你的學院名稱:"); gets(x); printf("請輸入你的專業名稱:"); gets(y); printf("請輸入你的班級號:"); scanf("%d",&z); printf("請輸入你們一個班有幾個人:"); scanf("%d",&p); system("cls"); for(i=0;i<p;i++) { printf("請輸入第%d個學生的學號:",i+1); scanf("%d",xuehao[i]); getchar(); printf("請輸入第%d個學生的姓名:",i+1); gets(xm[i]); system("cls"); } printf("您已經錄入完畢您的班級所有學生的信息!\n"); printf("您的班級為%s%s%s\n",x,y,z); /*alter(p);*/ } void inputsc() { int i; for(i=0;i<p;i++) { printf("\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t錄入學生的成績\n\n\n"); printf("--------------------------------------------------------------------------------\n\n"); printf("\t\t\t\t%s\n",xm[i]); printf("\n"); printf("\t\t\t\t數學:"); scanf("%d",&shuxue[i]); printf("\n"); getchar(); printf("\t\t\t\t英語:"); scanf("%d",&yingyu[i]); printf("\n"); getchar(); printf("\t\t\t\tc語言:"); scanf("%d",&c[i]); system("cls"); } } void alter() { int i;/*循環變量*/ int m[10000];/*要查詢的學號*/ int b;/*修改后的成績*/ char kemu[20]=""; printf("請輸入你要修改的學生的學號"); scanf("%d",&m); for (i=0;i<p;i++) { if (m==xuehao[i]) { printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]"); printf("請輸入你想修改的科目");} } gets(kemu); getchar(); if (kemu=="數學"); { scanf("%d",&b); shuxue[i]=b;} if (kemu=="英語"); { scanf("%d",&b); yingyu[i]=b;} if (kemu=="c語言"); { scanf("%d",&b); c[i]=b; } printf("%s的數學成績為%d,英語成績為%d,c語言成績為%d,xm[i],shuxue[i],yingyu[i],c[i]"); } void scbybannji() { int i; char zyname[20]; int bjnumber; printf("請輸入你的專業名稱"); scanf("%s",&zyname); printf("請輸入你的班級號"); scanf("%d",&bjnumber); for (i=0;i<p;i++) { if (zyname==y[i]); if (bjnumber==z[i]); printf("專業名稱%s班級號%d數學成績%d英語成績%dc語言成績%d,y[i],z[i],shuxue[i],yingyu[i],c[i]"); } }
標簽: c語言
上傳時間: 2018-06-08
上傳用戶:2369043090
步驟一 按快捷鍵Ctrl+N新建A4大小空白橫向文檔,并填充顏色為淺綠色。 步驟二 選擇工具箱中的“貝塞爾工具”繪制荷葉,使用“形狀工具”進行節點調整。填充輪廓色和填充色。 步驟三 在工具箱中選擇“網狀填充工具”設置網格中的行列數為3*3,鼠標框選中間4個節點,統一填充顏色為(R:0,G:153,B:51)。 步驟四 選擇“貝塞爾工具”繪制荷葉葉脈,由于所畫線條是不連接的單一曲線,所以繪制時可以借助鍵盤上的“空格”鍵來進行切換。 步驟五 接著利用“貝塞爾工具”依照前面的方法繪制出不同形態的葉子并Ctrl+G群組。 步驟六 用“貝塞爾工具”繪制荷葉莖部,按F12鍵調整曲線寬度為3,自定義顏色值為(C:70,M:0,Y:100,K:0),然后執行“對象”→“將輪廓轉換為對象”命令,再次按F12鍵添加寬度為細線的(C:78,M:19,Y:76,K:0)的顏色值,調整順序到后層。 步驟七 選擇一片群組合過的葉子,進行位圖模糊處理,放在畫面后面,達到近實遠虛的視覺效果。 步驟八 選擇“貝塞爾工具”繪制花瓣,借助網狀填充工具填充粉色到洋紅色,按Ctrl鍵繪制一個正圓,按F12把圓加粗,然后執行“對象”→“將輪廓轉換為對象”命令(Ctrl+Shift+Q)。 步驟九 繪制各種形態的荷花造型,并群組圖形。
上傳時間: 2018-08-03
上傳用戶:cjmktt
為了增加公司收入,F 公司新開設了物流業務。由于 F 公司在業界的良好口碑,物流業務一開通即受到了消費者的歡迎,物流業務馬上遍及了城市的每條街道。然而,F 公司現在只安排了小明一個人負責所有街道的服務。 任務雖然繁重,但是小明有足夠的信心,他拿到了城市的地圖,準備研究最好的方案。城市中有 n 個交叉路口,m 條街道連接在這些交叉路口之間,每條街道的首尾都正好連接著一個交叉路口。除開街道的首尾端點,街道不會在其他位置與其他街道相交。每個交叉路口都至少連接著一條街道,有的交叉路口可能只連接著一條或兩條街道。 小明希望設計一個方案,從編號為1的交叉路口出發,每次必須沿街道去往街道另一端的路口,再從 新的路口出發去往下一個路口,直到所有的街道都經過了正好一次。 輸入數據格式: 輸入的第一行包含兩個整數n, m(1≤n≤10, n-1≤m≤20),表示交叉路口的數量和街道的數量,交叉 路口從1到n標號。 接下來m行,每行兩個整數a, b,表示和標號為a的交叉路口和標號為b的交叉路口之間有一條街道, 街道是雙向的,小明可以從任意一端走向另一端。兩個路口之間最多有一條街道。 輸出輸出格式: 如果小明可以經過每條街道正好一次,則輸出一行包含m+1個整數p1, p2, p3, ..., pm+1,表示小明經過的路口的順序,相鄰兩個整數之間用一個空格分隔。如果有多種方案滿足條件,則輸出字典序最小的一種方案,即首先保證p1最小,p1最小的前提下再保證p2最小,依此類推。 如果不存在方案使得小明經過每條街道正好一次,則輸出一個整數-1。
標簽: 代碼
上傳時間: 2019-07-04
上傳用戶:Rain
function [R,k,b] = msc(A) % 多元散射校正 % 輸入待處理矩陣,通過多元散射校正,求得校正后的矩陣 %% 獲得矩陣行列數 [m,n] = size(A); %% 求平均光譜 M = mean(A,2); %% 利用最小二乘法求每一列的斜率k和截距b for i = 1:n a = polyfit(M,A(:,i),1); if i == 1 k = a(1); b = a(2); else k = [k,a(1)]; b = [b,a(2)]; end end %% 求得結果 for i = 1:n Ai = (A(:,i)-b(i))/k(i); if i == 1 R = Ai; else R = [R,Ai]; end end
上傳時間: 2020-03-12
上傳用戶:15275387185
This book is an entry-level text on the technology of telecommunications. It has been crafted with the newcomer in mind. The twenty-one chapters of text have been prepared for high-school graduates who understand algebra, logarithms, and the basic principles of electricity such as Ohm’s law. However, it is appreciated that many readers require support in these areas. Appendices A and B review the essentials of electricity and mathematics up through logarithms. This material was placed in the appendices so as not to distract from the main theme, the technology of telecommunication systems. Another topic that many in the industry find difficult is the use of decibels and derived units. Appendix C provides the reader a basic understanding of decibels and their applications. The only mathematics necessary is an understanding of the powers of ten
標簽: Telecommunications Fundamentals 2nd of ed
上傳時間: 2020-05-27
上傳用戶:shancjb
This edition updates and continues the series of books based on the residential courses on radiowave propagation organised by the IEE/IET. The first course was held in 1974, with lectures by H. Page, P. Matthews, D. Parsons, M.W. Gough, P.A. Watson, E. Hickin, T. Pratt, P. Knight, T.B. Jones, P.A. Bradley, B. Burgess and H. Rishbeth.
標簽: Propagation Radiowaves edition 3rd of
上傳時間: 2020-05-31
上傳用戶:shancjb
復活節計算 int y, n, a, q, b, m, w, d, mm = 4; y = atoi(argv[1]); n = y-1900; a = fmod(n,19);
上傳時間: 2021-07-09
上傳用戶:scfan2004