Android Image processing to search a pattern - image

I am working with an android application for capturing an image and processing. My requirement is to scan the captured image for two thick lines and its colour on a white surface. I need to know how it is possible to do in android.
captured image is like this
Thanks for any help

Related

Cognitive Image Search API - Get only transparent background images

I am currently trying to use the Cognitive Image Search API - V5.
My question is quite simple, is there a way to filter the result of the request to get only images with transparent background ? (Not only filtering by file extension, some png are not transparent). Obviously I didn't find anything useful in the doc or on the web.
I would appreciate if you guys could give me some tips!
This particular search parameter is not available. the current filters that are available are listed below.
aspect—Filter images by aspect ratio (for example, standard or wide screen images)
color—Filter images by color or black and white
freshness—Filter images by age (for example, images discovered by Bing in the past week)
height—Filter images by height
imageContent—Filter images by content (for example, images that show only a person's face)
imageType—Filter images by type (for example, clip art or animated GIFs)
license—Filter images by the type of license that applies to the image
size—Filter images by size, such as small images up to 200x200 pixels
width—Filter images by width
You can see further information for Bing Image Search query parameters here

Appcelerator - Saving image to a file from ImageView with fixed resolution

I am trying to save the content of an ImageView into a file and save it as an image. The simple code snippet which I am using is:
writeImageToFile(imageView.image);
The function writeImageToFile, saves the blob in a file which contains the image displayed in the image view. All good and fine till here.
Now the point noticed in here is that, I have defined the ImageView with the width and height as 150dip. After saving the image into a file, for iPhone 5, we find that the image resolution is 300x300, and for iPhone 6 Plus it is 450x450. The image resolution varies with the screen density, which I can understand.
But my query is that is there any way to always keep the resolution fixed to 150x150 pixels. Am not sure if this is possible out of the box with Appcelerator or do we need to use external modules.
Note: This is also applicable for Android too.
You can use the Blob functions to check the image size, then decide if you need to resize. You can use imageAsResized (http://docs.appcelerator.com/platform/latest/#!/api/Titanium.Blob-method-imageAsResized) to make a 150x150 image.

How to convert Autocad drawing to image?

I have an Autocad drawing which is a plan for land squares where each square contains a number.
I tried to convert it to image by choosing: File --> Export Data --> and file format Bitmap (bmp). (I have Autocad 2013 Mac version)
the file converted to image, but the quality is too bad, I can't see the land numbers inside the square when I zoom in the image.
I tried also with Postscript (PS file format), quality is a bit better but it's still bad.
Is there away to convert Autocad file to image but still preserve it's high quality details
I need to convert the file to image because I would like to publish it online on my website. maybe there other was to publish autocad file on line, if so, please advice. But the trick I want the background of the autcad (plan) to be transparent so that I could display it on top of Google maps. I if I used autocad plugin I can't make it transparent. right?
Use the PLOT (for the current drawing) or PUBLISH (for batching) commands to produce high quality images.

Image and video fullscreen?

)
I have a application to show some videos and images.. like a presentation.. The images have different resolution's and the videos to. I want to put the images and the videos in full screen mode but without lose quality.. The rotation of screen is fine, but the media content does not appear like they should..
Basically i want to show the images centered in vertical and horizontal without lose quality..
Suggestions?
For the video I would recommend using a MediaElement with the Stretch attribute set to 'Uniform'. 'Uniform' takes up all the space that you give the control but it ensures that the video maintains its aspect ratio. You should still have all the qaulity possible because the stretching happens on the GPU and it does a great job. You can see an example here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.aspx
Now, if you want the video to only scale up to it's orignial size but not get blown up any larger, then just set the Stretch property to 'None'.
The Image control works the same way and also has the same Stretch property. See the Image class documentation and sample here:
http://msdn.microsoft.com/en-us/library/system.windows.controls.image(v=VS.95).aspx
Did you try the MediaElement API and the NaturalVideoHeight and NaturalVideoWidth properties?

How to build a 8.5 x 11 inch "Poster" PNG or JPG from Text and Pics

I need to build a Poster (8 1/2 by 11) using data entered by the user and pictures and place that poster in the user's media library. It looks like BitmapImage is the mechanism to build either a JPG or PNG image but how do I place text strings and pictures on the image in a grid/form fashion?
TIA,
George
If you need to place things in a grid ina form-style, it might be worth building it up in XAML or in code and then using WriteableBitmap to render it to a bitmap.
You might find the following posts useful to achieve this:
WP7 Screen Capture On-Device
Screen Capture on Windows Phone 7
For an example of combining images and text see how do i add text to image in c# or vb.net
Of course, any image can be printed at any size, it depends on the quality you want.

Resources