-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
511742e
commit 0eb5d3a
Showing
45 changed files
with
1,761 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<class name="CameraServer" inherits="Object" category="Core" version="3.0.alpha.custom_build"> | ||
<brief_description> | ||
</brief_description> | ||
<description> | ||
</description> | ||
<tutorials> | ||
</tutorials> | ||
<demos> | ||
</demos> | ||
<methods> | ||
<method name="feed_is_active" qualifiers="const"> | ||
<return type="bool"> | ||
</return> | ||
<argument index="0" name="id" type="int"> | ||
</argument> | ||
<description> | ||
Returns true if the feed with this id is active. | ||
</description> | ||
</method> | ||
<method name="feed_set_active"> | ||
<return type="void"> | ||
</return> | ||
<argument index="0" name="id" type="int"> | ||
</argument> | ||
<argument index="1" name="active" type="bool"> | ||
</argument> | ||
<description> | ||
Activates or deactivates the feed with the given id. | ||
</description> | ||
</method> | ||
<method name="feeds" qualifiers="const"> | ||
<return type="Array"> | ||
</return> | ||
<description> | ||
Returns an array of available feeds. | ||
</description> | ||
</method> | ||
</methods> | ||
<signals> | ||
<signal name="camera_feed_added"> | ||
<argument index="0" name="id" type="int"> | ||
</argument> | ||
<description> | ||
Signal to alert a new feed is available | ||
</description> | ||
</signal> | ||
<signal name="camera_feed_removed"> | ||
<argument index="0" name="id" type="int"> | ||
</argument> | ||
<description> | ||
Signal to alert a feed was removed (say USB camera was unplugged or another program took ownership of a camera) | ||
</description> | ||
</signal> | ||
</signals> | ||
<constants> | ||
</constants> | ||
</class> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
[vertex] | ||
|
||
|
||
layout(location=0) in highp vec4 vertex_attrib; | ||
layout(location=4) in vec2 uv_in; | ||
|
||
out vec2 uv_interp; | ||
|
||
void main() { | ||
|
||
uv_interp = uv_in; | ||
#ifdef H_FLIP | ||
uv_interp.x = 1.0 - uv_interp.x; | ||
#endif | ||
#ifdef V_FLIP | ||
uv_interp.y = 1.0 - uv_interp.y; | ||
#endif | ||
|
||
gl_Position = vertex_attrib; | ||
|
||
} | ||
|
||
[fragment] | ||
|
||
in vec2 uv_interp; | ||
|
||
// seems without atleast one settable uniform we can't compile our shader because our enum won't be setup... | ||
uniform float i_seem_to_need_one_of_these; | ||
|
||
uniform sampler2D color_y; //texunit:0 | ||
uniform sampler2D color_cbcr; //texunit:1 | ||
|
||
layout(location = 0) out vec4 frag_color; | ||
|
||
void main() { | ||
vec3 yuv; | ||
vec3 rgb; | ||
|
||
yuv.x = texture(color_y, uv_interp).r; | ||
yuv.yz = texture(color_cbcr, uv_interp).rg - vec2(0.5, 0.5); | ||
|
||
// BT.601, which is the standard for SDTV is provided as a reference | ||
/* | ||
rgb = mat3( | ||
vec3( 1.00000, 1.00000, 1.00000), | ||
vec3( 0.00000,-0.34413, 1.77200), | ||
vec3( 1.40200,-0.71414, 0.00000) | ||
) * yuv; | ||
*/ | ||
|
||
// Using BT.709 which is the standard for HDTV | ||
rgb = mat3( | ||
vec3( 1.00000, 1.00000, 1.00000), | ||
vec3( 0.00000,-0.18732, 1.85560), | ||
vec3( 1.57481,-0.46813, 0.00000) | ||
) * yuv; | ||
|
||
frag_color = vec4(rgb, 1.0); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.