Try   HackMD

ImageJ 教學:分析光譜照片

作者:王一哲
第1版:2016/4/6
第2版:2020/6/14


操作步驟

首先開啟 ImageJ

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
ImageJ 主視窗

再將光譜照片拖曳進 ImageJ,本例當中所用的光譜照片,是從 Tracker 的範例影片裡截取來的,分別為氫、氦、汞,圖中的 2 個亮點是用來標記位置的雷射光,波長分別為 543 nm 、 633 nm,在檔案管理員當中選取這 3 張照片,拖曳到 ImageJ 的視窗再放掉滑鼠左鍵即可開啟圖片。


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Tracker 範例裡的氫原子光譜照片

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Tracker 範例裡的氦原子光譜照片

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Tracker 範例裡的汞原子光譜照片

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
開啟後的 3 張照片

將光譜照片組成 Stack,由工具列依序點選 ImageStacksImages to Stack

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image → Stack → Images to Stack

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
以 3 張照片組成的 Stack

選取雷射標記部分並複製成新的 Stack,由工具列依序點選 ImageDuplicate 或按快速鍵 Ctrl+Shift+D

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
選取雷射標記部分

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image → Duplicate(快速鍵為 Ctrl+Shift+D)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Duplicate選項,要勾選 Duplicate stack

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
複製後的圖片(雷射標記部分)

繪製灰階值 - 位置關係圖,找出峰值對應的位置,步驟如下:

  1. 將複製後的圖片全選,由工具列依序點選 AnalyzePlot Profile 或按快速鍵 Ctrl+K
  2. 在畫出來的圖上用長方形選取工具,選取峰值部分,按 + 號放大圖片
  3. 將滑鼠游標移動到峰值上,讀取峰值對應的位置,單位為 pixels

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Analyze → Plot Profile(快速鍵為 Ctrl+K)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
灰階值 - 位置關係圖

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
灰階值 - 位置關係圖(放大峰值部分)

換算位置與波長的關係,步驟如下:

  1. 由工具列依序點選 AnalyzeToolsCurve Fitting
  2. 將 Curve Fitting 視窗內的數值刪除,填入上個步驟找到的位置及對應的波長,例如:274 543、399 633
  3. 選擇 Straight Line ,按下 Fit,得到換算用的公式,本例中得到的是
    y=345.72+0.72x

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Analyze → Tools → Curve Fitting

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Curve Fitting 開啟的視窗

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Curve Fitting 開啟的視窗,填入位置與波長對應的值

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Curve Fitting 的結果

開啟 LibreOffice Calc 並填入換算公式


Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
B2 = 345.72     B3 = 0.72

回到 ImageJ ,在原圖組成的 Stack 選取光譜部分,複製為新的 Stack 再拆開,步驟如下:

  1. 移動上、下兩個邊即可,不要改變水平方向的選取範圍
  2. 按下 Ctrl+Shift+D 複製選取的部分
  3. 選取複製後的 Stack 再拆開為 3 張圖片,這樣可以確保 3 張圖片選取的部分完全相同,由工具列依序點選 ImageStacksStack to Images

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
修改選取範圍

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
複製後的 Stack

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
Image → Stacks → Stack to Images

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
拆開後的 3 張照片

選取拆開後的照片,繪製灰階值 - 位置關係圖,將資料貼到 LibreOffice Calc,步驟如下:

  1. 點選其中一張照片,按 Ctrl+A 全選,按 Ctrl+K 繪圖
  2. 點選圖片左下角的 List ,顯示圖片資料
  3. 在資料表上按 Ctrl+A 全選,按 Ctrl+C 複製,到 Calc 視窗按 Ctrl+V 貼上資料

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
氫原子光譜灰階值 - 位置關係圖

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
資料表格

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
將資料貼到 Calc

用 Calc 將位置換算為波長,繪製強度 - 波長關係圖,步驟如下:

  1. 在儲存格 F2 上按 = ,輸入 $B$2+D2*$B$3
  2. 利用自下填入的功能記算 F 欄所有儲存格對應的波長
  3. 插入 XY散布圖,繪製強度 - 波長關係圖
  4. 重複以上步驟,繪製氦原子、汞原子光譜強度波長關係圖

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
在 F2 中輸入算式

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
自動填入完成 F 欄所有的計算

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
插入 XY 散布圖步驟1

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
插入 XY 散布圖步驟2

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
插入 XY 散布圖步驟3

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
插入 XY 散布圖步驟4

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
氫原子光譜強度 - 波長關係圖

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
氦原子光譜強度 - 波長關係圖
Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
汞原子光譜強度 - 波長關係圖

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
原子光譜強度 - 波長關係圖

參考資料

  1. 用imagej進行光譜校正01-curve fitter。2016年4月23日。取自 https://youtu.be/OrsxpVGoNTs?list=PLm6x13NbsKl74Ut0Mr-KNxHaOs3WlJchV
  2. 用imagej進行光譜校正02-利用試算表繪製圖形(更改座標)。2016年4月23日。取自 https://youtu.be/ACrOm8T4MYc?list=PLm6x13NbsKl74Ut0Mr-KNxHaOs3WlJchV
  3. 用imagej進行光譜校正03 存檔。2016年4月23日。取自 https://youtu.be/Nsb6CLIkWnY?list=PLm6x13NbsKl74Ut0Mr-KNxHaOs3WlJchV
  4. 用imagej進行光譜校正04 組圖。2016年4月23日。取自 https://youtu.be/KFew1n1T_lQ?list=PLm6x13NbsKl74Ut0Mr-KNxHaOs3WlJchV

延伸閱讀

  1. ImageJ 教學:分析海水表面溫度
  2. ImageJ 教學:分析光的干涉、繞射照片

tags:ImageJ