Hi i need that when i put something like a ball in front of my webcam a square is putten around that ball and keep following it if i moved the ball i currently have no idea on how i can do this so any help whould be appreciated thank you all
Easiest way I can think of would be to crank the contrast up internally, then go by color on this high contrast image to look for edges (of a ball, in this case). For just a rectangle this can be a relatively fast calculation:
-Find the leftmost pixel of color that you are looking for (red ball perhaps)
-Scan to the right (not necessarily pixel by pixel, an approximation algorithm can improve efficiency here) until there is no longer that color
-Find the top most point of that color, scan down till you find the bottom most point like you did scanning to the right
-You now have the boundary for your shape in the image
-Note that the higher the contrast, the easier the edge detection will be. This high contrast image, however, should be stored internally and the coordinates of the boundaries sent off to render the rectangle to the actual image.
People make millions off of software like this so don't expect it to be easy. This type of technology can get A LOT more sophisticated - so much so that operating systems like windows start to become a bad platform for development due to insufficient clock speeds. This is why things such as Microsoft Kinect use embedded systems for these calculations.
write a C++ program which take inputs from the user/keyboard and calculate his ZAKAT.
get the input from user may include
-Amount invested in business
-Amount given to other business partners as loan
-Amount payable to others
I made a prime number finder, it finds the nearest prime that is above and below any integer (Does not work that well with giant numbers.)
Made this in cpp.sh
Why would I need the x=y+1-1;?
x=y; just doesnt seem to work
Why is this?
And I know my coding ...