This video is for all who watch my project's tutorial video. You have noticed that after 1-2 min of usage of the app keep crashing. I have found the solution. The problem is when you transpose the image.
Example:mat_image.t()
You have to release the image Mat manually.