screen_capture_lite icon indicating copy to clipboard operation
screen_capture_lite copied to clipboard

IOS onFrameChanged always triggers in createwindowgrabber() example

Open friksa opened this issue 5 years ago • 7 comments

Even when there are no changes in a window, onFrameChanged triggers for every capture frame. This is not an issue when capturing the entire monitor with createframegrabber().

Tried with different windows, but getting the same results. On OS X Catalina.

PS: Thanks for an awesome project!

friksa avatar Nov 26 '19 10:11 friksa

It will take me a few days to take a look at this as I havent even started my mac up in about 5 months so i have to update everything ...

smasherprog avatar Nov 28 '19 16:11 smasherprog

I no longer have a mac to fix this. I know the images returned by the OS callback might differ slightly.. If you can issue a PR on this, or provide more info that would be awesome

smasherprog avatar Jun 18 '20 01:06 smasherprog

the title says iOS, do we mean MacOS ? any way I can help ? I can confirm the behavior is occurring on my Mac Mini Intel 2020

EMCP avatar Oct 11 '21 16:10 EMCP

If you can figure it out.
My guess is that the images are slightly different each frame I am unsure what needs to be done to fix this. My thoughts: are the changes between images like red is 100 and 101 in another. If thats the case, then some variance can be added to the code. Maybe getting the difference for windows on mac is just something that isnt do able in which case the function should have no effect on mac..

I am not sure what path needs to be taken, but ... Give it a shot!

smasherprog avatar Oct 11 '21 19:10 smasherprog

Once I have my basic setup maybe I can jump into the sensitivity settings. the first thing I need to work on is figuring out the color shifting.. im trying to push these frames to a remove machine to run inference.. and thinking it best I first get the colors as needed before transmitting them

image

there's probably some way to make it tunable, sort of like how some webcams offer a sensitivity rating

EMCP avatar Oct 11 '21 20:10 EMCP

Did you test saving image to disk as the example does? If the image looks fine there, then its something in the way you are displaying the colors, for example you could be swapping the R abd B

smasherprog avatar Oct 13 '21 12:10 smasherprog

I'll stop stealing this thread, and maybe open up a PR if I can get the colors right.. but basically on OSX I just uncommented and run the code.. open it in the default Mac Preview App..

so maybe for mac OS I gotta just do something special with the color order, as you stated.

EMCP avatar Oct 13 '21 18:10 EMCP