---
# System prepended metadata

title: W-影像處理HW
tags: [影像處理]

---

# W-影像處理HW
###### tags: `影像處理`

## Visual Studio
- [Microsoft 教學](https://docs.microsoft.com/zh-tw/visualstudio/ide/tutorial-1-create-a-picture-viewer?view=vs-2019)
- [為程式碼符號重新命名的重構](https://docs.microsoft.com/zh-tw/visualstudio/ide/reference/rename?view=vs-2019)

### c++
- [windows form安裝](https://www.youtube.com/watch?v=HcxlYkU8aY0)
- [OpenFileDialog 開啟圖片並顯示在 PictureBox上](https://medium.com/@s12121296simon/%E5%BD%B1%E5%83%8F%E8%99%95%E7%90%86-%E4%B8%80-visual-c-clr-openfiledialog-%E9%96%8B%E5%95%9F%E5%9C%96%E7%89%87%E4%B8%A6%E9%A1%AF%E7%A4%BA%E5%9C%A8-picturebox%E4%B8%8A-ccbe34db50ba)
- [影像處理(五) Visual C++ Clr 影像去雜訊 中值濾波 Median Filter](https://s12121296.wordpress.com/2018/10/07/%e5%bd%b1%e5%83%8f%e8%99%95%e7%90%86%e4%ba%94-visual-c-clr-%e4%b8%ad%e5%80%bc%e6%bf%be%e6%b3%a2-median-filter/)

### c#
- [未將物件參考設定為物件的執行個體](http://m.blueshop.com.tw/Thread.aspx?tbfumsubcde=BRD20180731185900HA3)

#### Multiform
- [WinForm 多重視窗的操作 Multiple Forms](https://yuchungchuang.wordpress.com/2018/06/09/winform-%E5%A4%9A%E9%87%8D%E8%A6%96%E7%AA%97%E7%9A%84%E6%93%8D%E4%BD%9C-multiple-forms/)
- [C#多個Form視窗切換](https://oblivious9.pixnet.net/blog/post/192683977)

#### Message box
- [【C#】——MessageBox 訊息框](https://www.itread01.com/content/1543976527.html)
- [c# 學習筆記](https://rmotex.blogspot.com/2016/10/c_14.html)

#### chart
- [C#.Net 使用Chart繪製長條圖](https://cyfangnotepad.blogspot.com/2015/01/cnet-chart.html)
- [C# chart控件用法](https://zh.codeprj.com/blog/93b1cc1.html)

#### class
- [Day22-C#-怎麼建立類別Class及其建構函式Constructor(建構子)、屬性 (Properties)、欄位 (Field)、方法 (Method)](https://ithelp.ithome.com.tw/articles/10213236)
- [Day23-C#-傳說中的static!!!靜態類別和靜態類別成員](https://ithelp.ithome.com.tw/articles/10213238)

#### call by reference/value
- [傳值Call by Value / 傳址 Call by Reference](https://isniceday.blogspot.com/2017/03/crefoutcall-by-value-call-by-reference.html)

#### get picturebox point
- [Read picture box mouse coordinates on click](https://stackoverflow.com/questions/18040945/read-picture-box-mouse-coordinates-on-click)

#### draw point
- [C#使用Graphics畫圓寫字](https://www.itread01.com/p/611595.html)

#### atan2
- [System.Math.Atan2 方法](http://www.csref.cn/vs100/method/System-Math-Atan2.html)

#### double format
- [“c# format double” Code Answer’s
](https://www.codegrepper.com/code-examples/csharp/c%23+format+double)

#### list
- [Arraylist](https://docs.microsoft.com/zh-tw/dotnet/api/system.collections.arraylist?view=net-5.0)
- [List](https://frank1025.pixnet.net/blog/post/347251643-%5Bc%23%5D-list)

## HW1
### Problem 1
- [彩色轉灰階原理(RGB To Gray)](http://atlaboratary.blogspot.com/2013/08/rgb-g-rey-l-gray-r0.html)
- extract RGB channel, transform to grayscale
- [How to convert a color image into grayscale image in C# using Visual Studio](https://dyclassroom.com/csharp-project/how-to-convert-a-color-image-into-grayscale-image-in-csharp-using-visual-studio)
- [C# Tutorial: How To Convert a Color Image To Grayscale](https://epochabuse.com/csharp-grayscale/)

### Problem 2
- [mean filter](https://honglung.pixnet.net/blog/post/85466716-image-processing---%E5%9D%87%E5%80%BC%E6%BF%BE%E6%B3%A2(mean-filter))
- [median filter](https://honglung.pixnet.net/blog/post/85115497-image-processing---%E4%B8%AD%E5%80%BC%E6%BF%BE%E6%B3%A2(median-filter))

### Problem 3
- Histogram Equalization
- [Image Processing - 直方圖等化(Histogram equalization)](https://honglung.pixnet.net/blog/post/83681254-image-processing---%E7%9B%B4%E6%96%B9%E5%9C%96%E7%AD%89%E5%8C%96(histogram-equalization))
- [影像處理(Image Processing) ---------- 直方圖均衡化 (Equalization)](https://www.itread01.com/content/1545182354.html)

### Problem 5
- [Sobel edge detection](https://medium.com/%E9%9B%BB%E8%85%A6%E8%A6%96%E8%A6%BA/%E9%82%8A%E7%B7%A3%E5%81%B5%E6%B8%AC-%E7%B4%A2%E4%BC%AF%E7%AE%97%E5%AD%90-sobel-operator-95ca51c8d78a)
- [Edge detection邊緣偵測](https://medium.com/@helen3909/edge-detection-%E9%82%8A%E7%B7%A3%E5%81%B5%E6%B8%AC-d5908aeb8e7c)

### Problem 7
- [C# BFS DFS 迷宮尋徑 深度優先演算法 廣度優先演算法](https://www.itread01.com/content/1550473417.html)
- [影像處理：Component Labeling (標號)](http://mermerism.blogspot.com/2014/05/component-labeling.html)

### Problem 8
- [How to retrieve zoom factor of a WinForms PictureBox?](https://stackoverflow.com/questions/10473582/how-to-retrieve-zoom-factor-of-a-winforms-picturebox)
- [在C#中計算角度](http://codingjames.blogspot.com/2010/03/c.html)
- [How can I rotate an image by any degree?](https://stackoverflow.com/questions/12024406/how-can-i-rotate-an-image-by-any-degree)
- [【影像處理】Nearest Neighbor and Bilinear Interpolation](https://jason-chen-1992.weebly.com/home/nearest-neighbor-and-bilinear-interpolation)
- [Rotation matrix with center](https://stackoverflow.com/questions/9389453/rotation-matrix-with-center)
- [Graphics.ScaleTransform Method](https://docs.microsoft.com/zh-tw/dotnet/api/system.drawing.graphics.scaletransform?view=windowsdesktop-5.0)

```c#=1
Bitmap rotatedImage = new Bitmap(width, height);
rotatedImage.SetResolution(bmp.HorizontalResolution, bmp.VerticalResolution);

using (Graphics g = Graphics.FromImage(rotatedImage))
{
    // Set the rotation point to the center in the matrix
    g.TranslateTransform(bmp.Width / 2, bmp.Height / 2);
    // Rotate
    g.RotateTransform(angle);
    // Scale
    g.ScaleTransform(scaling, scaling);
    // Restore rotation point in the matrix
    g.TranslateTransform(-bmp.Width / 2, -bmp.Height / 2);
    // Draw the image on the bitmap
    g.DrawImage(bmp, new Point(0, 0));
}

return rotatedImage;
```

## HW2
### Step 1 - Faster R-CNN
- [Object detection: Bounding box regression with Keras, TensorFlow, and Deep Learning](https://www.pyimagesearch.com/2020/10/05/object-detection-bounding-box-regression-with-keras-tensorflow-and-deep-learning/)
- [Pytorch Starter - FasterRCNN Train](https://www.kaggle.com/pestipeti/pytorch-starter-fasterrcnn-train)

### Step 2 - Rotated R-CNN
- [rotated maskrcnn](https://github.com/mrlooi/rotated_maskrcnn)
- [rotation detection](https://github.com/yangxue0827/RotationDetection)