I do not know how to deal with pixel value and convert it to Dp Unit or percentage Unit.
And even the text, I do not know how to make it adaptive.
How can Jetpack Compose help me with these issues?
Thanks all
Related
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.
I am trying to composite the following images to produce an image that would demonstrate how the following swimwear would look in the attached patter material such that realism is key. While a strong java programmer with a CS background, and i have experience in other languages, like python, I have no idea where to start, I looked at JavaCV but it is just so complex and has so many functions i would not know which are relevant here.
Any guidance, or examples here would be greatly appreciated.
Anyway, i'm afraid there's no straightforward solution you can use since this can be a quite large project:
Extract the normal map of the swimsuit. This is needed to stick the pattern to the swimsuit, for example, the pattern should look bulged in the bra compared to other flatter areas.
You need to do texture synthesis (http://en.wikipedia.org/wiki/Texture_synthesis) since you need to resize the pattern to be larger.
Apply the synthesized pattern
For the realism, you also need to extract the shadow from the white swimsuit (if the swimsuits are white this will be easier). After applying the pattern, put back the shadow to the composite image.
You can refer to these papers:
http://maverick.inria.fr/Publications/2009/WOBT09/TextureDraping_EGSR_2009.pdf
and
http://graphics.cs.cmu.edu/projects/nrt/
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.
TdxComponentPrinter is a componenet that allow me print a TPanel on a paper. But there is problem and when the panel contains TImage, the background of the image will be converted to black in the paper.
Before print :
After print (on the paper) :
I have tried different ways to solve this problem. for example i used Repaint; method of TPanel,...
but doesn't work and the background of image is still black. I don't know why!!!
Help me please.
This is a png file, which might not be supported completely in your Delphi version. Did you try to change it to a TcxImage which might be more compatible with the DevExpress printing system?
It also might be worth it to submit this issue to DevExpress if you can't fix it. They reply really quick and know more about their components then all of use here on SO :-)
If it is already a jpg then you should improve the quality of the jpg. It looks like the black parts are compression artifacts where there is a mix between white and another color. If you clean up the background of the image with a paint program it will probably look a lot better.
I got a jpeg image in which is 1020x780, I am trying to resize this to 111x85 (which is in proportion) but it comes out pixelated.
I am tried just
a) Assign the image to a TImage component and set the Scaled/Resize property.
b) The resize code here http://www.delphigroups.info/2/4/313095.html
c) The resize code here http://www.swissdelphicenter.ch/torry/showcode.php?id=1896
However they all come out pixelated.
If I resize in Photoshop then it comes out nice. Getting it THAT good would be ideal, however I know they spent a lot of time/code into resize so something even halfway between would be great.
Any suggestions?
Have a look at Graphics32 library. It implements various image resampling and transformation algorithms for 32-bit bitmaps.
In my blog I talk about resize images using/implementing antialiasing.
Read the article and test the code here. It's writed in Spanish but you can use authomatic translate. In any case you can read only the code.
See the difference of apply and not apply the code:
The code work with BMP, but you can convert the image first and apply it.
Instead of using the built-in TImage for scaling, you could use an external library or component, e.g. ImageMagick or some off-the-shelf component. There exists at least one Pascal wrapper for ImageMagick
http://wiki.freepascal.org/PascalMagick)
, but I've never used it myself.
I have successfully used HiComponents ImageEn library to resize an image down to approx 250 pixels. It was a while ago, but I recall that the results were quite pleasing. http://www.hicomponents.com/main/products/products-imageenvcl - it's free now, and well worth a look if you're doing any graphics programming in Delphi.