-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVision.lua
48 lines (40 loc) · 1.13 KB
/
Vision.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
camera = require(script.Camera)
convolve = require(script.Convolve)
pool = require(script.Pool)
visualize = require(script.Visualize)
vision = {
eye = script.Parent.Parent.Head
}
-- Pipeline plan
-- camera Plane: maintains a frame that gets updated by rays.
-- Interpolation Plane: interpolates values from sensor frame to upsample
-- Luminence Plane: Computes the greyscale of the interpolated plane
-- Gaussian Plane: computes a low-pass of the interpolated plane
-- Laplacian Plane: computes a high-pass of the interpolated plane
-- Vertical Derivative Plane: computes the vertical derivative
-- Horizontal Derivative Plane: computes the horizontal derivative
-- Edge Detection
-- Corner Detection
-- Texton Segmentation
-- Texture Segmentation
function render(eye)
local target = eye
local layer
layer = camera.transform(eye)
visualize.display(layer, target)
wait(1)
layer = convolve.transform(layer)
--visualize.display(layer, target)
wait(1)
layer = pool.transform(layer)
--visualize.display(layer, target)
wait(1)
end
function initialize()
local eye = vision.eye
while true do
render(eye)
wait(0.1)
end
end
initialize()