findCircle from SimpleCV returns NoneType - simplecv

I am doing example from the:
COMPUTER VISION USING SIMPLECV AND THE RASPBERRY PI
by Cuauhtemoc Carbajal
that is on the page 75. I have written the program, and when I start it I always get that img.findCircle(canny=200,thresh=250,distance=15) function has returned a NoneType, and it cant do nothing.
I hope that there is here somebody who can explain this to me.
Thanks

A NoneType simply means that the search failed to find any circle above the threshold you set. Try lowering both the canny and the thresh parameter.

Related

Unable to manage desired output of PID controller

I am trying to drive a BLDC motor using FOC algorithm. As shown in the figure, I have implemented an RPM controller on top of current control loop of FOC, where the output of RPM PI controller is directly fed to the Iqset of FOC block and Idset is kept at 0.
figure
Problem: I want Iqset to vary form 0 to 60A but this value is low, even at the stalling load Iqset reaches to only 4 to 5A. I have tried different values of Kp and Ki for tuning the RPM controller but unable to achieve the desired result.
I don't know where i am wrong, any help would highly be appreciated.
Further experimental Info: I have tried setting the Iqset at 0.25A just to eliminate the RPM controller, in that case motor runs at full speed with no problem. That brings my attention to the RPM controller but i don't know where i am wrong.
Thanks.

In Veins does "RecievedBroadcasts" also consist of "SNIRLostPackets" and "RXTXLostPackets"?

I would just like to know if the value of "RecievedBroadcasts" for each of the node in Veins also consists of the packets lost or does it just give the number of successful packet receptions. That is if I want to calculate the packet loss ratio, then would it be TotalLostPackets/RecievedBroadcasts or TotalLostPackets/(RecievedBroadcasts + TotalLostPackets).
Thanks for your help
Your best bet to find out exactly how statistics are logged is to look into the source code of Mac1609_4.
You will find that the ReceivedBroadcasts scalar logs the value of variable statsReceivedBroadcasts which is increased via a method called from handleLowerMsg, so only when the Mac layer successfully decoded data.

Tensorflow debugger breakpoint (tfdbg)

I am new in tensorflow and I am trying to run a basic program but I am getting the error while feeding the data into the model. I would like to debug it to pin point what is causing the error. I want to track the data in a node of the graph. When I am starting the tfdbg it throws the error "OutOfRangeError RandomShuffleQueue".
Is there any way to debug it from the start ? or can we put the breakpoint in the program ? I understand that the tensorflow program has a graph structure and it might not excecute like a normal python script.
Any help is appreciated.
To make it short,
can we put a breakpoint in a tensorflow program at the desired location to see the tensor values?

How to run PATCHMATCH source code

I would like to inpaint one image with a corrupted part using the patches of another image. in the link below, the authors of PATCHMATCH algorithm has provided the users with the source code. PATCHMATCH algorithm tries to find the nearest patch in the second image to fill the corrupted patches in the first image.
main page of the paper with source code:
http://gfx.cs.princeton.edu/pubs/Barnes_2009_PAR/index.php
and the link of source code:
http://www.cs.princeton.edu/gfx/pubs/Barnes_2009_PAR/patchmatch-2.1.zip
My problem is that I followed the instruction in the readme.txt file and ran build_unix.sh in terminal of Ubuntu 14.04 LTS,but got an error which says:
Unknown MEX argument '-inline'.
Unknown MEX argument '-inline'.
I removed -inline and execute the bash file in terminal and fortunately it worked and got this message:
MEX completed successfully.
MEX completed successfully.
Now my question is how to use this code to inpaint one image corrupted partially by using another image which comes from the same class (e.g.class)
For example:
I do really appreciate it if you could help me out of this problem. I am really in the need of help and have to make this source code run.
I will provide you with more information if needed.
Update: I have come up with an inpainting algorithm using Convolutional Neural Networks, which you can see the result below, I'd like to implement patchmatch algorithm to compare my result with this algorithm. CNN only gets corrupted image as input.

MOSEK C api time limit

I'm trying to find a way to limit the time of execution of MSK_optimize routine. However, browsing through MOSEK docs gives me nothing. I have tried with:
MSK_putnaintparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 );
and playing with the value on the right, but this does not seem to solve the problem and looks like it does not even affect MOSEK. Setting MSK_DPAR_MIO_MAX_TIME manually is not possible. Other than that, I have found nothing that can influence maximum time MOSEK will run. Any help appreciated.
The function MSK_putnaintparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 ); would have returned a proper error code. So if you did not ignore those you would have discovered your mistake.
For anyone that could find this helpful:
The problem is that MSK_DPAR_OPTIMIZER_MAX_TIME is a double and not an integer parameter. After losing a whole day on this, I finally found that putting:
MSK_putnadouparam( task, "MSK_DPAR_OPTIMIZER_MAX_TIME", 1 );
does the trick.

Resources