11-06-2013 05:42 AM
Rethinking to a problem always adds more details to study...
One big problem can derive from the format of the image file you want to examine: some graphic formats are lossless (i.e. do not loose any data because they do not perform any compression on the image). BMP format is one of them: each pixel in the image is exactly moved to file at the cost of a larger file size; PNG is another lossless format.
Other file formats introduce compression algorithms to reduce the file size, but in this process some of the information can be lost and some artifacts are introduced in the final image. Depending on the use of the image, this degradation can be negligible, in your case definitely it's not. Consider for example these images: both of them are the details of a CVI graph (this one, for what it's worth) taken at 100 and 70 quality parameter (100 is the best possible). Even on screen you can see the artifacts introduced in the second image, if you examine them in detail you will see how oblique lines are drawn on screen.
( JPG with quality = 100 )
( JPG with quality = 70 )
That is: getting the trace from the picture can be not so simple.
Additionally, in your analisys code you cannot forget some smoothing process to obtain a reasonable reproduction of the original measures.
I am attaching a set of images for you to examine: they are the same picture detail in .BMP, .PNG and .JPG format, the last one with 100 and 70 quality parameter.
11-07-2013 11:57 PM
Thank you so much.
While plotting bitmap image on the graph, i cannot find any transparency.
White background of the bitmap image obscures the graph.
Can u help me with that also.
Thanks in advance.
regards,
Manju
11-08-2013 12:30 AM
Take a look at the code posted by Alex D in this thread: it should be what you need.
11-08-2013 05:09 AM
I got transparency.
I loaded sine wave as the bitmap image.
But I just need the amplitude of the sine wave to send through communication port.
Can you give some ideas for this?
thanks in advance.
regards,
Manju
11-08-2013 05:12 AM
in other words how to extract samples from the sine wave in the bitmap image?
regards,
Manju
11-08-2013 05:44 AM
Manju,
as I already told you, I have no real experience on such a matter. I gave you some conceptual framework for you to consider, but I cannot go beyond this.
Moreover: in my opinion this procedure is
1. Conceptually hard to implement, for the reasons I depicted
2. Time consuming while developing
3. Subject to large errors while executing due to bitmap aproximation, image aliasing and so on (consider for example how to detect the trace if it is not painted in solid color)
I'm afraid I cannot help you more than this...
I suppose I would not agree in developing it even if you hired me, which you are not willing to: are you?
11-23-2013 06:16 AM
yeah as you said it is difficult to implement.
Finally I used GraphGrabber software to get my graphical data values and with that values, I plotted the graph.
Thank you.
Manju.