code for Image Gradient plugin in Gimp 2.10.8 [closed] - plugins

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I wrote a C++ code where I perform edge detection on color or gray images (ppm files).
My code works well but is not as good as a specific Gimp plugin, especially when detecting more faint edges (low luminosity gradient). The plugin I am referring to is under Filters/Edge-Detect/Image Gradient in Gimp 2.10.8. Mouse hover says "Compute gradient magnitude and/or direction by central differences".
Below I embedded a gray test image to compare the results (i.e. gradient intensity), although my work is in color as well. The test image consists of some 13 circular rings with various luminosities (constant for each ring). The difference in luminosity between two adjacent rings increases from 2 luminosity units (for the inner rings) to 30 luminosity units (for the outer rings) in the outward radial direction.
As expected, the detected gradient is small for the inner rings and higher for the outer rings. The problem is that my C++ code is less sensitive to small gradients than the Gimp plugin is, as can be seen from the other two images below.
Where can I find the code for the Gimp Image Gradient plugin so I can learn something from it? I am not interested in the other Gimp plugins for edge detection (I verified that they are not quite as good as the Image Gradient, at least for my application).

It is in the GEGL package
File is operations/common/image-gradient.c

Related

Unity2D Simulating height with Top Down Shadows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
So the problem is the following:
I have been trying to make this flying simulator little phone game, the problem is i cant make the shadow change with a smooth transition...
That White squared is a cloud, and the objective is to have the shadow change size while in the cloud...
I don´t really know were to start, i tried shaders, but i´m not that good with that...
Thx :))
If you are not into shaders, I would look into Masks. Masks basically limit a sprite to only draw within it's boundaries.
In this example, you could have a mask on the cloud. To make it work, have the "nearer" shadow be always drawn, but only in the mask's boundaries (In this case - the cloud) Relevant Youtube Tutorial

Corner detection of a simple shape in an image [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a grayscale and noisy image of a simple shape, such as a square, that has 4 corners, and I want to extract their positions. What corner detector is best suited for this application?
I'm trying to avoid SIFT because I'm looking for a simple detector.
in a noiseless case, Canny edge detection would give the highest values to the
4 corners of the square.
The question is - how noisy is you image. if it's too noisy you'll need a more complex solution for this problem.
if the image is too noisy, I suggest using houghlines transform (matlab function - houghlines) in order to find 4 lines in the image, and then search for their crossovers to get the four corners of the square.

How big should touchable area be? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I am porting a web app to a mobile app using phonegap. In it there is a window control that is resizable similar to windows in Windows, i.e. clicking the edge and dragging.
My initial thought is to simply translate touch events to mouse events, and when doing this I notice that the edges, i.e. the touchable area need be rather big in order to be able to hit it with a touch.
I am wondering how big should an area be in order to conveniently be able to touch it? My second solution is to build the resize using pinch zoom or something else.
48dp.
http://developer.android.com/design/style/metrics-grids.html
Why 48dp?
On average, 48dp translate to a physical size of about 9mm (with some variability). This is comfortably in the range of recommended target sizes (7-10 mm) for touchscreen objects and users will be able to reliably and accurately target them with their fingers.
If you design your elements to be at least 48dp high and wide you can guarantee that:
your targets will never be smaller than the minimum recommended target size of 7mm regardless of what screen they are displayed on.
you strike a good compromise between overall information density on the one hand, and targetability of UI elements on the other.

How to impose a constraint on contours frame by frame [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm implementing some piece of code in MATLAB to track left ventricle wall position in echocardiography images using a contour-based method. Unfortunately in some frames the contour evolves more than it is expected and in some regions the wall does not have good contrast.
Does anyone know a way to restrict contours from unexpected evolution from frame to frame saving both old frame's position and new one's shape?
Thank you all for helping.
Image segmentation is a hard problem. There is no general approach that works well in every situation. How are your contours being defined? Are you doing threshold-based segmentation, or using another approach? Have you tried transforming into a polar coordinate system in the centre of the LV? Have you tried quantifying some sort of 'least-squares' cost associated with moving the contour?
All I can suggest is look at how people solve similar problems. In my field (namely MRI), the best we have a) isn't really all that good, and b) is probably this open-source Matlab 'program' designed for cardiac segmentation called segment (see http://medviso.com/products/segment/features/cmr/). I suggest you look at how they do it, and see if you can adapt the method to work with the (much noisier, much harder to interpret) echo images.
Sorry I can't be more helpful!

Are there any Javascript Chart libraries which do scatterplots? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I need to plot discrete X,Y data as a MAP in a PNG or GIF file colour-coded to indicate discrete values.
All the Javascript Chart libraries I've seen do pie charts, line graphs, bar charts, etc, but NOT scatterplots.
Does anyone know the name of a library capable of scatterplots?
My current solution is to render the map as an HTML table (and screen-capture) where the cells are empty but have coloured backgrounds, depending on the discrete value. As you would expect, this is slow. Particularly when X and Y can take values 0 to 200, or more.
It also suffers from distortion when browsers choose cell size. Browsers decrease cell width across the page as they realise their original choice was too great. Circular maps end up looking egg-shaped and one end is more pointy than the other
How about this for ZingChart (http://www.zingchart.com/docs/chart-types/scatter/) Others do have it. The idea you used with a table solution seems a little more like a "heatmap" or some call piano style chart with different values per cell represented by intensity, image, etc. That isn't quite a scatter but that is in the library as well http://www.zingchart.com/docs/chart-types/piano/
You should be able to find equivalents in other libraries like HighCharts as well.
Disclosure: I work at ZingChart.
Please take a look at
Raphaël—JavaScript Library