ImageResizer adjusting white balance - imageresizer

Been playing with StudioJS wrapper for ImageResizer. Can ImageResizer adjust the white balance relative to a color? Ultimately, I want the user to be able to click an area in the image that should be white, and the rest of the image adjusts.
I see the Auto Balance functionality that uses the AdvancedFilters plugin, I guess I want to take it a step further.

No, ImageResizer doesn't current support adjusting relative to a color. However, if you wanted to implement said feature, it would not be difficult.
You could modify AdvancedFilters.cs, inserting an IF statement near line 150, and add support for a new command, such as "&a.white=rrggbb".
Simply provide the RGB values to the LinearLevels class to perform the scaling on the image.
http://www.aforgenet.com/framework/docs/html/29bf1191-47c9-314b-eb8d-bea3f903ac28.htm
If you like the result, and want to share it, send me a pull request on GitHub or e-mail me the code snippet. If it passes testing, it might make it into the next release.
Client side, you might find this library helpful for selecting a color from an image.

Related

How to manually set white balance on Processing Android mode with Ketai?

I am beginner to the Ketai library under Processing framework in Android mode. I need to manually set the white balance of the camera, however I can not find any reference for this in either Ketai docs or Google.
Thus, is this possible under Processing without digging into the native android.hardware.camera2 (which is a bit beyond my expertise)? If not, then what would be the easiest way to manually set the white balance?
Regards!

Cloudinary upload image widget does not work as expected

I am using the upload image widget without success.
1) result.info.path returns invalid url.
2) There is no preview of the uploaded images due to no.1
3) No images are were uploaded to my media folder at Cloudinary.
Fiddle:
https://jsfiddle.net/7uqb83t1/
These are my preset settings:
Can someone share a working version of this widget + preset settings?
On successful upload, you need to check result.info.secure_url for a link to the asset. Currently, in your preset, you're using Async which means the incoming transformation is performed in the background (asynchronously), and as such, you will get a pending result. Async assumes you're using a Notification URL as a webhook where you'll receive the Upload API response when the processing is complete. In your case, I'd recommend turning the Async off.
Also, your incoming transformation configured in the preset is not valid and because of that, you will be getting an error on upload. Please console.log this in your JSFiddle to see it. Essentially, it'll be -
Auto gravity can only be used with crop, fill, lfill, fill_pad or
thumb
'auto' gravity (g_auto) implies cropping (automatically selecting the most interesting part of the image to focus on) and therefore you need to use an appropriate crop mode. 'scale' keeps all image data and no cropping is made so that is why g_auto can't work with it. Please see the following section of the documentation for details on the different crop modes - https://cloudinary.com/documentation/image_transformation_reference#crop_parameter - which will help you decide which one you want to use.
Lastly, you should also consider updating your incoming transformation so that it only resizes once, since currently, resizing it three times with the same crop mode is redundant. For example, you can use c_scale,q_auto,w_687 only, or if you want with 'auto' gravity you can try c_fill,g_auto,q_auto,w_687.

Read code markers of a images

I do not know the real name of this type of "QR" they are used in augmented reality and other tracking applications.
Here is a image of what it looks like.
I want to build a vb.net program that finds as many of this in a image. I do not need to get angels and so. Only a number.
The marker need to handler +10K of numbers and tolerate rotation.
I did use https://github.com/jcmellado/js-aruco as a template to solve my problem.

MapKit how to get the Bezier path of a State

When i look at apple's Map, I can see the different bezier path of a specific place. I would like to know how to extact that information directly from the map. So let's say the user selects New York, I would like to highlight NEW York's Bezier path directly on the map. can this be done?
You will need an alternative form of data that ideally is very close to or exactly the same as the border being drawn by MapKit. You aren't going to get this from Apple.
Take a look at this blog post, where I accomplish the same thing with an open source framework (Mapbox GL) on the web:
http://justinmiller.io/posts/2015/01/20/anatomy-of-a-travel-map/
The ability to highlight areas like this should work in the iOS version of the toolkit as well (https://github.com/mapbox/mapbox-gl-cocoa) though you will not be able to do the interactivity directly in that framework.

ImageResizer minwidth / minheight for ebay images

Ebay now requires images to be 500x500.
I want to try to use ImageResizer to resize an image to be a minimum of 500x500 by adding white background padding
The following command achieves this quite easily.
product.jpg?width=500&height=500&scale=canvas
This works great, except when the original image is 800x800 and it will be downsized and lose quality.
What I really want to do is combine scale=canvas with scale=upscaleonly but that doesn't seem to be possible? Am I missing something or will I have to write code myself using the API.
PS. I realize ebay may detect whitespace and still reject the image, but I'm trying that for now - I have a lot of perfectly good 450x450 images that fall short and I don't want to upscale them.
At present, there's no 'upscalecanvasonly' mode.
So far we haven't had anyone else request this, but feel free to add it to our UserVoice site as a feature idea.
You could also implement this with a small IPlugin that subclassed BuilderExtension and implemented LayoutImage to support an additional command. It shouldn't be very difficult.
I haven't used ImageResizer before, but I've worked with images, so I took a quick peek at the basic commands for ImageResizer.
If I understand your problem correctly, when you downsize a 800x800 image it looses quality. This does point to a severe problem because the original image has more data than what is needed to display a high quality 500x500 image. Because of this, we must look at the image file format type and the data compression quality/method.
In your example, you are using the JPEG file format. You may want to specify the format in the command, i.e., format=jpg
In using the JPEG format, Imageresizer gives you control over the quality of the compression:
The documentation states:
quality - Jpeg compression: 0-100 100=best, 90=very good balance, 0=ugly
Take a look at the documentation for the exact verbage for setting the quality.