325
edits
No edit summary |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 50: | Line 50: | ||
<br style="clear:both"> | <br style="clear:both"> | ||
=='''Detection'''== | =='''Part 4 Detection'''== | ||
'''Capture: jit.rgb2luma''' | '''Capture: jit.rgb2luma''' | ||
Line 64: | Line 64: | ||
"cv.jit.label", "cv.jit.blobs.bound", "cv.jit.blobs.bound.draw" can be regarded as combo objects, these three objects aim to detail the pixel matrix on the image filter by "jit.op @op < @val 172" in the last step. To read the pixels with similar brightness as pixel blobs, to classify them as a group, and finally use mark this group in rectangle. And in this case, the blobs represent the head of people in the top view. | "cv.jit.label", "cv.jit.blobs.bound", "cv.jit.blobs.bound.draw" can be regarded as combo objects, these three objects aim to detail the pixel matrix on the image filter by "jit.op @op < @val 172" in the last step. To read the pixels with similar brightness as pixel blobs, to classify them as a group, and finally use mark this group in rectangle. And in this case, the blobs represent the head of people in the top view. | ||
'''Read the position of blobs''' | |||
The code part in the left-bottom side output the data of blobs into position value in x and y axis. There are five group of data, from the first to the fifth respectively represents: 1. the order of the blobs that are captured, which is "0" in my case. 2. the x0 value of the blobs. 3. the y0 value of the blobs. 4. the x1 value of the blobs. 5. the y1 value of the blobs. | |||
(x0, y0) and (x1, y1) mean the position of left-top point and right-bottom point of the blob. Hence, the center point of the blob is (x1-x0)/2, (y1-y0)/2. And it is (205-131)/2, (151-79)/2= (37,36) in my case. | |||
' | Above explains how to get more accurate value of blob's position under the adjustment in reading images. | ||
'''You can download the complete code of MaxMsp here:''' <https://github.com/ConnorFk/MaxMspDBLPosition> | |||
[[Image:testing result position result.png|thumb|left|653px]] | [[Image:testing result position result.png|thumb|left|653px]] | ||
[[File:stesting process.jpg]] | [[File:stesting process.jpg]] | ||
<br style="clear:both"> | <br style="clear:both"> | ||
'''Now, you can get the value of people's position!''' | |||
Thank you. |
edits