talmo / leap

LEAP is now deprecated -- check out its successor SLEAP!
https://sleap.ai
Apache License 2.0
206 stars 48 forks source link

loading image into make skeleton GUI #11

Closed kbakhurin closed 5 years ago

kbakhurin commented 5 years ago

Hi Talmo,

I am having a problem loading the "I" variable into the createSkeleton program. Here is the error I am getting:

`Error using figure Invalid enum value. Use one of these values: 'on' | 'off'.

Error in create_skeleton/loadRefImg (line 39) app.imgFig = figure('CloseRequestFcn',@(h,~)app.CreateskeletonUIFigureCloseRequest(), ...

Error in create_skeleton/ImportfromworkspaceButtonPushed (line 309) app.loadRefImg(I);

Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback (line 309) Error while evaluating Button PrivateButtonPushedFcn.`

Would you have any clues about what this could be caused by? It seems like this is specifically happening with one machine.

Thank you! Konstantin Bakhurin

kbakhurin commented 5 years ago

Update: after restarting the computer, I was able to load the variable. Interesting.

sofs12 commented 5 years ago

Hey there, Any explanation for this error? I have the same problem as well and restarting the computer does not solve it :( Thanks in advance for any help! Sofia

talmo commented 5 years ago

Hi Sofia,

Not sure what may be the exact issue, but try this out as a workaround:

  1. In the Command Window, save the frame you want to use as reference to a file: imwrite(I, 'I.png')

This assumes the variable I contains a single frame, so if you have a movie loaded, try: imwrite(box(:,:,:,1),'I.png')

  1. In the Create skeleton app, click Load from image file... and select the image you just saved.

Let me know if that still doesn't work and we'll troubleshoot.

Talmo

sofs12 commented 5 years ago

The workaround solves the problem, thanks a lot! :)