You don't use the final 4 argument, but other than that it should work fine.
I don't know what "can i still declare my 4 connected objects" means. You don't declare them - they are simply in your binary image (what they called imgN - a poor, non-descriptive choice of name for a variable, just like "f"). If you want to extract just 4 blobs, based on some criteria, from the larger total number of blobs then you can do that. See my Image Segmentation Tutorial, BlobsDemo if you want to see how.