I know nothing (jit.dx.grab resolution issue)

    Dec 05 2012 | 3:58 pm
    Ok, I've been trying to make something that captures an image from a webcam combined with a template and then to save that image to my drive. With some help I've been able to get a patch that captures a still from my webcam. But the problem is the image quality is kinda crap, the resolution seems to be a bit off. I've fiddled around with the settings and I've been able to improve the image quality by quite a bit, but not enough. I was wondering if someone might know what could solve this.
    If this issue has been covered in another topic I do appologize, but I'm not very familiar with MAX and I havent been able to do a very extensive search.

    • Dec 05 2012 | 6:45 pm
      try [jit.dx.grab @dim 1024 768] (or whatever resolution your webcam runs at)
    • Dec 06 2012 | 11:35 am
      Oops, my bad. I had already done that, but not in this version of the file. While it does seem the number of pixels increases, the quality remains quite low. Not to mention the image gets stretched from a 4:3 ratio to a 16:9 ratio.
      EDIT: I'm trying to do it at a resolution of 1920 x 1080 . I've changed numerous of the references to lower resolutions, doesnt seem to do much.
    • Dec 06 2012 | 3:37 pm
      Well yes, your webcam probably operates at 1024x768 or another 4:3 ratio and you have Max coerce it in 1920x1080/16:9 format, which means stretching it up. Did you check your webcam's specs? If it doesn't do 1920x1080 natively there has to be some scaling up to bring it up to that size. Some filtering can cover up a bit of the lower resolution artifacts but it's never going to be crispy clear. Though you can scale up 1024x768 to 1920x1080 without overstretching horizontally by cropping some pixels at top and bottom.
      Btw, have you tested your webcam with another application to compare the image quality? Maybe it has poor quality to start with.
    • Dec 06 2012 | 3:56 pm
      My webcam operates at 1920x1080 normally. The image quality it normally does is pretty good I think. Definitely better than this, although the image quality might be just as good if I can get it to work at the proper resolution. It's a Logitech C920 for reference.
      EDIT: Just tried it on a different computer with a different webcam (built-in screen webcam thingy) which also has a standard resolution of 16:9 and it does the same thing.
    • Dec 06 2012 | 4:56 pm
      Sounds like 1 of the objects in your patch is defaulting to 320x240. Check it step by step to see at which step it occurs. Start by checking the output of your grab object by sending it straight to a [jit.window @size 1920 1080] and work your way down the line. Perhaps it's your webcam driver that needs to be told to output at 1920x1080. Dunno for sure, I'm on Mac.
    • Dec 06 2012 | 5:40 pm
      Ok, thanks, I'll give it a try.
    • Jun 15 2016 | 4:41 am
      Got the solution for this (3 years later). Check it in the
      file. There's a tab called Blackmagic (this is true for Max 7 at least).
      only outputs webcam supported formats after you send the
      message to
      . Then you can see -and select- the desired format and resolution (1920x1080 in this case).