Hi Kevin, line 234 is downsampling the image. We select a subset of the data, and save that so a new image “img”. Can you specify what you mean by “upsampling”? We can’t increase the ‘size’ our image and ‘add resolution’ in the regard… let me know!
Ahh ok. Once you overwrite the ‘img’ variable, you lose the data of those pixels. So I don’t think there’s a way to go back up and artificially create resolution (unless using advanced modern AI to improve image quality). What you could do, is create variables - img_1024 - img_512 - img_256 and so on, and then use each these images when needed. Not quite what you want at least now you can go back to higher images.
@@philparisi_ Yes, you do lose those pixels, so when you enlarge back up, the resolution sucks, but you can still enlarge back to the higher dimensions. Anyway, I found a way to do it. It's not as simple as one line, though. There were several lines involved, and I may not have done it right, but we'll see. Thanks, anyway.
Ahhhh ok I see what you are saying. Essentially force the pixels you have into the larger ‘grid’. Can you share your solution in this thread so others may use it in the future?
Thanks, what's the equivalent upsampling code for line 234: img = img(1:10:end, 1:10:end); ?
Hi Kevin, line 234 is downsampling the image. We select a subset of the data, and save that so a new image “img”.
Can you specify what you mean by “upsampling”? We can’t increase the ‘size’ our image and ‘add resolution’ in the regard… let me know!
@@philparisi_ Yes, upsampling as in going back up from 32x32 to 64x64 to 128x128 to 256x256 to 512x512 to 1024x1024.
Ahh ok. Once you overwrite the ‘img’ variable, you lose the data of those pixels. So I don’t think there’s a way to go back up and artificially create resolution (unless using advanced modern AI to improve image quality).
What you could do, is create variables
- img_1024
- img_512
- img_256
and so on, and then use each these images when needed. Not quite what you want at least now you can go back to higher images.
@@philparisi_ Yes, you do lose those pixels, so when you enlarge back up, the resolution sucks, but you can still enlarge back to the higher dimensions. Anyway, I found a way to do it. It's not as simple as one line, though. There were several lines involved, and I may not have done it right, but we'll see. Thanks, anyway.
Ahhhh ok I see what you are saying. Essentially force the pixels you have into the larger ‘grid’. Can you share your solution in this thread so others may use it in the future?