Resize sketch error

Ok, this doesn’t address your problem, but I want to point out this line is not right, referring to your first post. You need to assign this value inside setup() as width and height are never valid in a global scope.

Also, if you create the image with a dimension of width x height, then there is no need to resize it in draw().

Also you need to call img.loadPixels() which it is different to just calling loadPixels(). Do you spot the difference? The second one loads the pixels of the current main sketch, where all the drawing is taking place. The first one works on the pixels provided by the PImage object.

Also, what is the dimensions of the kinect image? Is it 480x640 pixels? if so, you should replace all magic numbers 480 and 640 by width and height.

If after implementing these changes, your image problem still persists, you will need to strip down your code to a minimum version that reproduces the problem. Implement the suggested changes first and see if it solves the issue.

Kf