For now, due to its convenience and simplicity, I use Python to design the algorithm and find the solution to this program.
What I have done:
Hu = pixel * rescale slope + rescale intercept
Now, we use the image matrix.
First, we find the inner circle of the rock container to fliter out the rock container when calculating porosity later.
Then, by findContours algorithm, we know where is the target.
Program flow:
First of all, use the CT value matrix as reference. If the point in the image matrix is in the circle and the contour of the target, we push the CT value into an array for further calculation. Second, after viewing all point, grab the max value in that array, which is CTG. So, we have CTG and the CT value of the target. Last but not the least, applying the formula (CTG - Hu) / CTG, suming them up and dividing by the number of pixel in the target, we get the porosity of the rock.
It's all because we want to remove the CT value of the container.
It will have a big error if we only use findContours algorithm since when we find the contour of the target, we also include the container. To avoid this situation, we filter out most of container by Circle Hough Transform.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing