目前我使用Microsoft Kinect测量关节之间的角度.大多数测量都正常工作.每当一个人侧身坐在椅子上(在椅子上)时,Kinect就不会准确地跟踪骨架.为了说明我的问题,我添加了3张Kinect深度视图的图片.



正如您所看到的,3个测量中有2个"正确"工作.每当我抬起腿时,Kinect都会正确地停止骨骼跟踪.有没有人能解决这个问题,或者这只是Kinect的限制?
谢谢.
更新1:
将JointTrackingState-Enumeration在屏幕截图2对这些跟踪关节所示被标记为Inferred,然而深度视图正在跟踪我的全身.
更新2: 截图2我试图跟踪我的前腿,突出显示为绿色.我知道另一条腿没有跟踪但是这没关系,我想.
更新3: 以下代码选择骨架:
private Skeleton StickySkeleton(Skeleton[] skeletons)
{
if (skeletons.Count<Skeleton>(skeleton => skeleton.TrackingId == _trackedSkeletonId) <= 0)
{
_trackedSkeletonId = -1;
_skeleton = null;
}
if (_trackedSkeletonId == -1)
{
Skeleton foundSkeleton = skeletons.FirstOrDefault<Skeleton>(skeleton => skeleton.TrackingState == SkeletonTrackingState.Tracked);
if (foundSkeleton != null)
{
_trackedSkeletonId = foundSkeleton.TrackingId;
return foundSkeleton;
}
}
return _skeleton;
}
Run Code Online (Sandbox Code Playgroud)
每当跟踪骨架时,数据将用于绘制关节点并计算关节之间的角度.
更新4: 我测试坐在一个"块",比椅子简化得多.不幸的是,Kinect的行为仍然相同.
以下2个截图:


我想实现以下目标:
+------------------Other container(s)-----------------+
| +------JScrollPane (vertical)-------+ |
| | JTextField | |
| | Box.createRigidArea (vertical) | |
| | JTextArea | |
| | { etc.. any other J-component } | |
| | | |
| | | |
| | | |
| | | |
| +-----------------------------------+ |
+-----------------------------------------------------+
Run Code Online (Sandbox Code Playgroud)
我能得到的最接近的是以下(伪)代码:
JPanel container = new JPanel(new BorderLayout());
JPanel innerContainer = new JPanel();
innerContainer.setLayout(new BoxLayout(_innerContainer, BoxLayout.Y_AXIS));
JScrollPane scrollPane = new JScrollPane(innerContainer);
container.add(scrollPane, BorderLayout.NORTH);
Run Code Online (Sandbox Code Playgroud)
每当我想添加组件时,它们都会添加到内部容器中:
innerContainer.add(new JTextField());
innerContainer.add(Box.createRigidArea(new Dimension(0, …Run Code Online (Sandbox Code Playgroud) 每当在以感叹号结尾的目录中运行可执行jar时,getResourceAsStream -method都返回null.
对于以下示例,我有一个Eclipse项目具有以下目录结构:
src\ (Source Folder)
main\ (Package)
Main.java
res\ (Source Folder)
images\
Logo.png
Run Code Online (Sandbox Code Playgroud)
我正在阅读Logo.png如下:
public static void main(String[] args) throws IOException {
try (InputStream is = Main.class.getClassLoader().getResourceAsStream("images/Logo.png")) {
Image image = ImageIO.read(is);
System.out.println(image);
}
}
Run Code Online (Sandbox Code Playgroud)
请参阅2个测试用例的附件.首先,可执行jar从目录"D:\ test123!@#"启动而没有任何问题.其次,可执行jar从目录"D:\ test123!@#!!!"启动,有问题.
是否不支持以感叹号结尾的目录?代码错了吗?
提前致谢.

在Jenkins的工作中,我正在执行一些驻留在前置步骤构建中的操作,例如执行shell脚本.使用Jenkins插件"EnvInject"我想将环境变量注入我的maven构建(单元测试),以便可以在我的Java单元测试中使用它们.在shell脚本里面我做了类似的事情:
echo "ip=$IP" >> unit-test.properties
Run Code Online (Sandbox Code Playgroud)
构建Jenkins时输出以下内容:
[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path 'unit-test.properties'
[EnvInject] - Variables injected successfully.
Run Code Online (Sandbox Code Playgroud)
但是我的Java代码(单元测试)中没有"ip"变量.当我对两者进行完整打印时,System.getProperties() and System.getenv()我没有看到"ip"入伍.
我是否需要对maven执行任何特殊操作才能将变量传递给我的Java代码?还有别的错吗?
从这一点开始,我几乎陷入困境,我确实希望key=value从我的Java代码中预先注入一个步骤.
Is there a regex which extracts SQL queries from a string? I'm NOT interested to validate any SQL syntax, rather and only extracting a selection of SQL commands. This to parse a given SQL file/string in a flexible manner.
Given is the following SQL file/string example:
SELECT
*
FROM
test_table
WHERE
test_row = 'Testing ; semicolon';
SELECT * FROM another_test_table;
INSERT INTO
table_name
VALUES
(value1,'value which contains semicolon ;;;;',value3,...);
Run Code Online (Sandbox Code Playgroud)
Some pseudocode example would be: ^(UPDATE|SELECT|INSERT INTO)(.*)(;)$. In the future …
考虑以下xml:
<Config>
<Paths>
<Path reference="WS_License"/>
</Paths>
<Steps>
<Step id="WS_License" title="License Agreement" />
</Steps>
</Config>
Run Code Online (Sandbox Code Playgroud)
以下JAXB类:
public class Path {
private String _reference;
public String getReference() {
return _reference;
}
@XmlAttribute
public void setReference( String reference ) {
_reference = reference;
}
}
Run Code Online (Sandbox Code Playgroud)
和
public class Step {
private String _id;
private String _title;
public String getId() {
return _id;
}
@XmlAttribute
public void setId( String id ) {
_id = id;
}
public String getTitle() {
return _title;
}
@XmlAttribute …Run Code Online (Sandbox Code Playgroud)