Hi All, Came across this fascinating program somewhere on the internet and used it in visual studio 2019. I also have opencv downloaded on my laptop. Not sure even if opencv is needed in this program.
Using this program I am filling in 3/4 of the console window with the brightest red possible (255). green is in the second place and blue in the third. In theory you could draw a picture with this program. It would be easier with a smaller screen, say 256. This is 3 times smaller in the console window.
This program is not of much use. I want to get a digital image into the console window. Then you can use GetPixel to see the color of any individual pixel or look at sections of the image and manipulate(edit) as desired using the for command. This appears to me to be much simpler than other methods I have seen. Can anybody suggest how I can get a image into the console window?
I will probably give up trying to use opencv for computer imaging if I can't get it simpler than the incomprehensible stuff they are feeding us on various tutorials. I originally had the same problems with Arduino until I went my own way in using it without their useless libraries. I now have great programs on arduino for programming microcontrollers to control hardware. Some good old maths do the trick. I do understand that many software programmers may not be very good mathematicians and this is why they come up with such terrible software.
You also need good hardware to go with your software. Hardware recommended by Arduino doesn't even work. I designed my own.
C:
#include <windows.h>
int main()
{
HDC hdc = GetDC(GetConsoleWindow());
for (int x = 0; x < 768; ++x)
for (int y = 0; y < 768; ++y)
SetPixel(hdc, x, y, RGB(255, 0, 0));
}
This program is not of much use. I want to get a digital image into the console window. Then you can use GetPixel to see the color of any individual pixel or look at sections of the image and manipulate(edit) as desired using the for command. This appears to me to be much simpler than other methods I have seen. Can anybody suggest how I can get a image into the console window?
I will probably give up trying to use opencv for computer imaging if I can't get it simpler than the incomprehensible stuff they are feeding us on various tutorials. I originally had the same problems with Arduino until I went my own way in using it without their useless libraries. I now have great programs on arduino for programming microcontrollers to control hardware. Some good old maths do the trick. I do understand that many software programmers may not be very good mathematicians and this is why they come up with such terrible software.
You also need good hardware to go with your software. Hardware recommended by Arduino doesn't even work. I designed my own.