-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.AccessViolationException throw if captures hand #15
Comments
|
Vector2 is part of Microsoft's System.Numerics. That class has Vector, Vector2, Vector3, and Vector4... and it is not part of Unity, though Unity does have its own Vector classes. Here is the method that fails (RetrieveHandData). At this point I'm trying to get Hand movement to determine which direction it's being waved. The first argument is which hand and the second is the datum which is derived from the "StdSharedPtr" which you will see in the examples of OpenPose. It comes from the WUserOutput.cs.
|
@bruce987 |
The number for middlejoint2 (10) comes from the OpenPose site itself. Scroll down toward the bottom to see the definition. https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/output.md I had to dig around to find it. They explicitly define the Body25 parts, but not for the face or hand. The show the numeric number for face and hand, but do not actually give them names like Body25. So I assign them names. The previous post shows how I retrieved the hand data. (RetrieveHandData). |
@bruce987 OK. |
@bruce987 It works fine. This 07_HandFromImage uses this snipet.
But if this is changed to this, demo crashes due to above watch window value.
|
Name of parts for hand. But where is 0? |
Ok, let me check my code and look at example 7. I'm doing it a little different. This is my code that initializes the Wrapper.
|
Keep in mind I'm capturing a video feed from a webcam and processing in real-time. |
OK. But i can not find Flags.HandDetector. It could be 0 as default value. |
memoXXXX = 0, |
I will change the names next week. The value 10 still works for the middle finger joint. I tried this... This causes an early exception. So I put it back to just the FlagsToDetector without setting it to 2, then it works. |
If you hook up your webcam and run the app. While just looking at the camera, raise your hand so the hand is detected. Then move your hand toward the camera... the exception will occur. |
I modified 11_AsynchronousCustomOutput. private static void ConfigureWrapper(Wrapper<Datum> opWrapper)
{
try
{
+ Flags.Hand = true;
+ Flags.HandDetector = 0;
// logging_level It works fine while 1 minute running.
But there is no problem |
Would like my project that does all this?
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:23 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
memo
XXXX = 0,
ThumbCarpometacarpal,
ThumbMetacarpophalangeal,
ThumbInterphalangeal,
ThumbFingerTip,
IndexMetacarpophalangeal,
IndexProximalInterphalangeal,
IndexDistalInterphalangeal,
IndexFingerTip,
MiddleMetacarpophalangeal,
MiddleProximalInterphalangeal,
MiddleDistalInterphalangeal,
MiddleFingerTip,
RingMetacarpophalangeal,
RingProximalInterphalangeal,
RingDistalInterphalangeal,
RingFingerTip,
PinkyMetacarpophalangeal,
PinkyProximalInterphalangeal,
PinkyDistalInterphalangeal,
PinkyFingerTip
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL6TLQKNYJ42GUDHWILRWO7XZANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL4AGOWXY56CT555R6TRWO7XZA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOXPIQ.gif>
|
Did you try to move your hand to the webcam? I use a Logitech C922 on a tripod. I found the error when I moved my hand to adjust the camera.
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:34 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
I modified 11_AsynchronousCustomOutput.
private static void ConfigureWrapper(Wrapper<Datum> opWrapper)
{
try
{
+ Flags.Hand = true;
+ Flags.HandDetector = 0;
// logging_level
<https://user-images.githubusercontent.com/6241854/84576405-7c27e600-adef-11ea-9d8a-c4cd0c0a8268.png>
It works fine while 1 minute running.
I tried
* raise right hand
* raise left hand
* hidd right hand
* hide left hand
* raise both hands
But there is no problem
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL5QY3EXVDDC6QC32ITRWPBCTANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL7CKXGIELL72WJX47DRWPBCTA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOXZHY.gif>
|
I switched to my laptop webcam, same thing happens.
Maybe in the process of modifying the example I introduced a bug.
If you’re not getting the issue when moving you hand toward the camera, then I have a problem in my project.
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:34 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
I modified 11_AsynchronousCustomOutput.
private static void ConfigureWrapper(Wrapper<Datum> opWrapper)
{
try
{
+ Flags.Hand = true;
+ Flags.HandDetector = 0;
// logging_level
<https://user-images.githubusercontent.com/6241854/84576405-7c27e600-adef-11ea-9d8a-c4cd0c0a8268.png>
It works fine while 1 minute running.
I tried
* raise right hand
* raise left hand
* hidd right hand
* hide left hand
* raise both hands
But there is no problem
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL5QY3EXVDDC6QC32ITRWPBCTANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL7CKXGIELL72WJX47DRWPBCTA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOXZHY.gif>
|
What does it mean?
Yes, my webcam Microsoft LifeCam Studio Q2F-00021 can not detect hand first time. |
oh,... I forgot to insert please wait!! |
I meant would you like a copy of my .net project. I zipped it up, but it includes the OpenPose DLL’s and models which make it very large. So I can’t send with the DLL’s or models.
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:43 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
oh,... I forgot to insert new [] {0, 10, 0}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL7RYJ3FEVDX3NKVPULRWPCDZANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL2PNW3YBH34GMLJIULRWPCDZA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOYAWI.gif>
|
@bruce987 |
@bruce987 After this, app crashes. |
Yes the app will run without issues for a very long time, but if you move your hand to the camera... EXCEPTION! I believe it may be happening in the C++ code. I use a fixed size queue to store 20 data points. The queue is a ConcurrentQueue so its thread safe...
|
I think you’re on to something. I turned off all pose initialization (body=false, face=false, hand=false). The exception occurs immediately in the accessing of the “handKeyPoints”. I ran it in the VS2019 debugger and put a break point prior to the assignment of var handKeyPoints = datum.HandKeyPoints[1];
When I look at the datum.HandKeyPoints[1] it shows the property Empty as True.
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:51 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
@bruce987 <https://github.com/bruce987>
I think this issue does not distance between camera and hand.
Perhaps, it may occur when openpose does not any parts, face, hand or body.
After this, app crashes.
<https://user-images.githubusercontent.com/6241854/84576774-42a4aa00-adf2-11ea-97cf-da52077aa25d.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL3WAIASMJ26AUVHMFLRWPDDBANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL7KOYBPLMHYIXEQZ7LRWPDDBA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOYITI.gif>
|
Wow… we’re debugging exactly the same conclusions. I will put a check into my app. I guess the demos may have the same issues.
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:57 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
You can check array property.
Crash
<https://user-images.githubusercontent.com/6241854/84576899-09206e80-adf3-11ea-8db0-cf26239c0712.png>
Normal
<https://user-images.githubusercontent.com/6241854/84576902-0faee600-adf3-11ea-93b4-6867097376cc.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL34J4AJXVBMUQPUPBLRWPDX3ANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBLYEJQX3YIENV6OLEB3RWPDX3A5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOYOBI.gif>
|
It works fine!! |
I’m putting in some guards now. This bug has been “bugging” me for a while, but didn’t put it as a high priority.
Thanks,
Bruce
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 1:59 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
var left = datum.HandKeyPoints[0];
if (left.Volume != 0)
{
//left.NumberDimensions
OpenPose.Log($"Left hand keypoints: {left[new[] { 0, 10, 0 }]}", Priority.High);
}
It works fine!!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL2JTY2T3CLPQFVN4K3RWPEAXANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL5TKAQUUIUEGCGQVV3RWPEAXA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOYQTI.gif>
|
OK. Thanks a lot for giving happy debugging time :) |
I’m fixing it now.
I will close the issue.
Thanks again,
Bruce
From: Takuya Takeuchi <notifications@github.com>
Sent: Saturday, June 13, 2020 2:06 PM
To: takuya-takeuchi/OpenPoseDotNet <OpenPoseDotNet@noreply.github.com>
Cc: bruce987 <bruce.w.hochstetler@gmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [takuya-takeuchi/OpenPoseDotNet] System.AccessViolationException throw if captures hand (#15)
OK.
Will you fix this issue on your company next week?
Please close this issue.
Thanks a lot for giving happy debugging time :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#15 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAMCBL4IEWUV6D3EPR3NLS3RWPEYDANCNFSM4N34XUAA> . <https://github.com/notifications/beacon/AAMCBL4OT7X6ODRPE5CDOGDRWPEYDA5CNFSM4N34XUAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEZOYWTA.gif>
|
I'm not seeing the "Close Issue" at the bottom of the issue. |
I think you own this thread. I can't close. |
Report from @bruce987
@takuya-takeuchi
I was revisiting your site to see if there was any new issues and came across this. I've been working with OpenPoseDotNet for awhile now. I'm capturing live video feed of the hand and trying to determine direction. Anyway, if I move my hand into the webcam to adjust it I get an access violation every time. I have a secondary camera on a tripod. I'm just reporting this issue to let you know it does happen on a regular basis.
Originally posted by @bruce987 in #5 (comment)
The text was updated successfully, but these errors were encountered: