Slider settings for GPUImage - iphone

I'm making an app which allows the user to apply GPUImage filters to still photos using a UISlider. I'd like for the slider to initially start at the zero point for each filter (i.e. the value at which none of the filter has been applied yet) and I'm wondering how this can be determined? I've used some of the values that are listed in the GPUImage documentation and for certain sliders they start at 0, but others it's hard to determine (and for some, the min and max values are way off for me). The values for something like GPUImagePosterizeFilter seem to be way off for me (set min to 1, max to 128 and initial to 1). I've also checked some of the values in the FilterShowcase test project which are different than the documentation, but still don't always start at 0. Am I just completely missing the point here? Or is there some setting I maybe have to turn on to be in line with the slider values?

Nope, no setting for this. All I can really recommend is that to make this as efficient as possible make a switch statement in a single method and determine what to do by index of the currently selected filter.
From there, I would leave the min/max values of the slider the same so that you don't have to animate from one calculated point to another if the filter changes and mathematically convert the slider's value into units that the current filter understands. i.e. 0-1 --> 1-128

I think I might have been approaching this the wrong way. Rather than looking for a "zero point" on a filter, I think I should focus on applying the filter only when the user applies it, and trying to find a good starting point that is close to how the image looks without the filter for the initial value on the slider.

Related

Is it possible to change the number of values generated by an animation?

I created an animation (curve animation) in flutter and I reuse the values provided by this animation. According to my console, I can have 35 values.
Is it possible to have more values generated, like ~60?
Thanks
No. This value depends purely on the framerate and the animation length.
There's no "limited number of values" like your question is implying. A new value will be generated whenever needed, which is usually once per frame.

tableau adjust marks size using number

In Marks, click Size and there pops a slider where I can adjust the size of a shape. But how to accurately control the size, is there some property with numbers to accurately control it? I have two sheets to show something similar and I want to display exactly the same sized shapes.
If you want to ensure 'sizes' are the same across two worksheets, I'd suggest snapping the 'size' setting to the center on both, as this is the easiest option to select. You can then use a measure to set the size, if this is desirable, and then the difference in size will be relative on both worksheets.
There isn't a numerical value override for the size slider.
Ben is correct, there isn't yet a numerical value override for the slider. You can use parameters with Min/Max/Sum etc. and a variable to somewhat change the sizes but they have to have multiple entries per line. It is unfortunate that Tableau still doesn't get that people want both a 'relative' sizing system that uses numbers from the dataset and a 'static' sizing system that allows for shapes to be set to '11px' or something along those lines. Yes, you can control that kind of in the dashboard with a vertical and fill entire box etc; but that doesn't address the very real scenario where you want a user to be able to re-size on the fly. Just my two cents.
I ran into this today. Very annoying. Need to keep shapes the same size across all worksheets and therefore same on dashboard.

Which color-key to use in a heat-map with a small range of values?

My data covers a small range, but I still like to make the small differences between the data points visible in a heat-map. What color-key is best to maximize color intensity (and not generating a greyish map) and how to set the range in pheatmap?
You didn't give enough information to give you an exact code example for your sample data, but something like the below is a way to get at the problem. In terms of what actual colours you want to use, I recommend you play around with it to see what looks best, I have just subbed in red and blue as a proxy.
pheatmap(yourdata, color = colorRampPalette(c("red", "blue"))(length(-12:12)),breaks=c(-12:12))
The length() is setting the range while the breaks=c(x:x) tells it where to make breaks. So let's say you wanted breaks every 0.2 from 0 to 1, you would modify it to be:
breaks=c(0,0.2,0.4,0.6,0.8,1.0)
You can play around with the break gradients to get something that works for your dataset.
This is my first attempt at answering a question on here, please let me know if something above does't work for you, or if you are confused by what I've written.

SSRS sparkline with small difference in values

I have created a sparkline in SSRS. Since the values are small i get a straight line graph How do i improve the sensitivity of the graph.
the difference is like for every month
60.06
60.40
60.14
You need to look at the Sparkline Vertical Axis Properties.
Testing with data like yours and a simple Tablix/Sparkline I get results similar to yours:
Opening the Vertical Axis Properties I can see Always include zero is checked by default:
Unchecking this option has a major effect on the sparkline:
So this is one way of doing it. Other than that changing the Minimum and Maximum values here will also have an effect - you just need to play around and find the right combination for you.

Is it possible to determine the current rendering position in Crystal Reports?

i would like to create a conditional keeptogether property depending on the space left on the current page, is it possible to get this value from within a formula field?
my goal is a visual clean report without wasting to much space, i already read about a method where you keep track of your position with a linenumber counter. unfortunately i cant use this approach because my lines vary heavy in height because of a note field which holds from 0 to 25 lines.
This is going to sound like a ridiculous and tedious suggestion, but it's the only way I know of making this work. You'll need to use that process of line counting (basically, keeping a running total of how many lines have been printed) that you heard of with one modification: calculate the number of lines Notes needs by the getting the length of that Notes string and dividing by a pre-determined count, which you'll need to do visually, of how many characters are in a line and make the result the line's line count in the overall formula. It's not going to be exactly right because there is no way to make it exactly right, but it will be close. Does that makes sense or do you need me to go into exact detail of how to do this?