How to program to make debugging simple?

I am trying to develop some very complex image-based applications. I use openCV extensively. However, as the complexity of my programs increases, I find it difficult to debug my programs. Just for debugging, I have to develop the same algorithm in Matlab together. The main reason for this is that even if there is any error in the matlab code, the values ​​of the variables are preserved even when the code stops working or when it crashes. Since values ​​exist, I can use various visualization tools to analyze it; like a conspiracy; showing it as an image. Is there any way or function that we can implement in C so that we can get closer to the same behavior.

0
c matlab
source share
1 answer

To debug vision algorithms, I highly recommend splitting the algorithm into different vision steps. The interface of each step as a function for a visual environment such as matlab, by creating your c-program as a plug-in . Then program the controller part as a matlab script instead of c. This allows you to view each step of the view as an image.

Edit: you cannot connect the visual studio plugin using the plugin method that I posted, see the comment.

+1
source share

All Articles