How to run a processing sketch even when the canvas is minimized

First of all, Is running the sketch even after minimizing the canvas possible?

I am going to use the exported .exe version of the sketch once completed.

Problem I am facing is 2 part.
I am trying to make an image capture system to work with an image processing software.

Part 1 :
The image processing system is the primary thing, where i have to continuously work with the captured image.
and new images are to be captured frequently. I want the capturing system to work in the background without minimizing the primary image processing system. how to do this?

Part 2:
Is it possible to trigger the capturing sequence using an external (button/ switch) connected to a serial port/USB port without using arduino ?
if yes, how?

Why don’t you run your image processing system and the primary image processing system at the same time?