Jmagick rounding corners - imagemagick

I've a question concerning Jmagick, how can I round corners of an image, and does this make sense or would it be better to do this using CSS in HTML ?
Thanks

I don't know about JMagick but rounding corners with IM is definitely possible. Check out the "roundRectangle" example here:
Imagemagick forum
how that command is interfaced by JM, I don't know but it should be easy to find out.

Related

How do I decide my image has bright text or dark text? [LabVIEW]

I'm working on a Text Extraction algorithm in which I need some assistance with thresholding an image. My development platform is LabVIEW 2015 and I'm using the "AutoBThreshold2.vi" from Vision Development Module 2015. I decided to go with Otsu's Algorithm for thresholding which is available as "Inter Class Variance" Method. Now, The problem is that I need to specify the "Look for" option to extract the text! Unfortunately, my input images will not always be same.
Kindly refer the attached source code along with sample images. My question is that Is there any way to find whether the image has Dark objects/Bright Objects on Dark Background/Bright Background? Meanwhile I'm also playing with Histogram to find out the BG & FG type!
I'd really appreciate your help...
With the help of NI forum, I'm able to solve this problem.
https://forums.ni.com/t5/LabVIEW/Auto-Thresholding-an-image-for-text-extraction/m-p/3904533#M1108133
Use equalize vi to solve this problem before thresholding, see below image to find it.

Noise Removing from Image with circular objects

What would be a good method to remove this type of noise from an image?
Morphological closing (dilation then eorsion) with a structuring element larger than the stroke achieves this:
It won't be possible to completely get rid of the residual irregularities.
Please do not accept this answer, and if you vote for it, please also vote for Yves's answer since I am merely illustrating how to implement his method and the credit is due to him.
So, you can just use ImageMagick at the command-line to do as Yves suggested like this:
convert ~/Desktop/utRjy.jpg -morphology close octagon:13 result.png

Find corner of field

I am working on project in C#/Emgu CV, but answer in any language with OpenCv should be ok.
I have following image: http://i42.tinypic.com/2z89h5g.jpg
Or it might look like this: http://i43.tinypic.com/122iwsk.jpg
I am trying to do automatic calibration and I would like to know how to find corners of the field. They are marked by LEDs, but I would prefer to find it by color tags. If need I can replace all tags by same color tags. (Note that light in room is changing so the colors might be bit different next time)
Edge detection might be ok too, but I am afraid that I would not find the corner correctly.
Please help.
Thank you.
Edit:
Thanks aardvarkk for advice, but I think I need to give you little bit more info.
I am already able to detect and identify robots in field and get their position and rotation. But for that I have to set corners of field manually first. So I was looking for aa automatic way, but I was worried I would not be able to distinguish color tags from background because light in the room is changing quite often.
And as for the camera angle. Point of this is that camera can be every time from different (reasonable) angle.
I would start by searching for the colours. The LEDs won't be much help to you as they're not much brighter than anything else in the scene. I would look for the rectangular pieces of coloured tape. Try segmenting the image based on colour. That may allow you to retrieve the corner tape pieces directly without needing to know their exact colour in advance. After that, you may look for pairs of the same colour blob that are close to each other to define the corners where the pieces of tape are the same. Knowing what kinds of camera angles you are going to have to solve is also very important -- if you need this to work when viewing from the side, then this approach certainly won't work. If it's almost top down, this would probably be a good start. Nobody will be able to provide you with a start to finish solution, but this might be a good base to begin with.

Is there a way to curve text/labels in Cocos2d?

Here is an example of what I would like to achieve.
Is there a way to "transform" a label in Cocos2d and obtain a curved text? I do not find any property in the CCLabelBMFont class that seem to allow this.
Any suggestion wellcome.
Rason for asking: I would prefer not to use pre-generated (with Photoshop or GIMP) text images. Hence I am looking for an answer to this problem and not to an alternative method.
One of the moderators of the Cocos2D forum has replied to me in their forum and it doesn't seem possible. Here is the link to the discussion on the forum, but as far as I can tell there is no solution (In my opinion it would require having implemented a draw call in the labels that blends the pixtures according to the new image matrix resulting from bending the original label image and as far as I can understand CCLabelBMFont does not seem to support this - and I am not sure that is easily possible to do so as the class does not derive from CCSprite but it may be in some other way that I do not know at the moment).

Parsing / Scraping information from an image

I am looking for a library that would help scrape the information from the image below.
I need the current value so it would have to recognise the values on the left and then estimate the value of the bottom line.
Any ideas if there is a library out there that could do something like this? Language isn't really important but I guess Python would be preferable.
Thanks
I don't know of any "out of the box" solution for this and I doubt one exists. If all you have is the image, then you'll need to do some image processing. A simple binarization method (like Otsu binarization) would make it easier to process:
The binarization makes it easier because now the pixels are either "on" or "off."
The locations for the lines can be found by searching for some number of pixels that are all on horizontally (5 on in a row while iterating on the x axis?).
Then a possible solution would be to pass the image to an OCR engine to get the numbers (tesseractOCR is an open source OCR engine hosted at Google (C++): tesseractOCR). You'd still have to find out where the numbers are in the image by iterating through it.
Then, you'd have to find where the lines are relative to the keys on the left and do a little math and you can get your answer.
OpenCV is a beefy computer vision library that has things like the binarization. It is also a C++ library.
Hope that helps.

Resources