Commit 1dac62e7 authored by Tony Cheung's avatar Tony Cheung


parent 6d90a7b1
**In-class Examples**
The C++ codes of In-class examples are available [here](In-class Examples).
**Exercise 1**
*Create a segmented image*
(1) Load a pair of lung CT image and airway mask using OpenCV library
(2) The program reads two arguments from command prompt
i.e. Exercise1.exe source278.png mask278.png
(3) Store two loaded images into dynamically allocated 2D arrays for manipulation
(4) Compute the airway segment from dynamically allocated arrays
(5) Save the result to a PNG file using OpenCV library
i.e. segmentedAirway.png
(6) Delete dynamically allocated arrays
**Exercise 2**
*Analyze DNA sequences*
(1) Load two DNA sequences from two files dynamically
(2) Count the total number of A,T,C,G in each sequence
(3) Compare the similarity between these two sequences
The A/T/C/G is at the same position on both sequences
Sequence 1 : CATCGACTCC
Sequence 2 : ACTCGGCTTC
Similarity = 6/10 = 60%
(4) Delete the dynamically allocated sequences
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment