I have a image column in a SFrame along with an image_array column.
when I do
sframe['image'].show()
instead of showing the actual images it shows summary of the image column along with value,count and percent. How should I show the actual image when I call the show method?
Set the show result to canvas in ipython notebook
graphlab.canvas.set_target('ipynb')
sframe['image'].show()
Use keyword browser instead ipynb as below stated
graphlab.canvas.set_target('browser')
Related
I have an image like:
image
Where the yellow box (CODICEFISCALE) is a field that must to be replaced by stored text in the database and the green box (firma) must to be replaced with another image of the user's signature.
How can I do that?
I am open to use any possible solution.
Update:
My question is only about replace the boxes (always the same) in the images (the images can be different).
I have a set of data consisting of 3 values, being time, dataValue, dataQuality. I'm trying to get the line color (not the marker because that is working) color set based on the dataQuality. The current graph is rendered based on time (x-axis) and dataValue (y-axis) and dataQuality is currently not used or shown.
What I would like tot have is the line color based on the data quality instead of the data value, all while rendering data value for the line.
Is this possible to achieve within hightcharts?
Edit: To clarify with an image, as requested. The red line is the only line I'd like tot render, the grey one is here solely to show the quality value for the data. So what I'd like is the red line to go grey (or whatever we decide it to be) as soon as the data from the other line drops below a threshold. The markers, even though done with paint here, are already done by setting the color value for individual markers grammatically when processing the incoming data. The grey line should not be rendered at all.
Alright, having a night of sleep over it helped. Instead of trying to do it the hard way, by using invisible values I though of another way to solve this.
I do know the timestamps for low quality points. I started using the timestamps on the x-axis to create zones with different colors. Which color for which zone is determined by the data quality.
I'm new to coding, and creating a line chart that is very simple.
What's not simple is, I want to have an image in each tooltip. I figured out how to have the same image in each tool tip, but I want a different image for each data point on the line. It doesn't need to change when I change the data, and the image has to be connected to the point on the line, and not just the value (for example day 3 might have a value of 10 and day 12 might also).
Has anyone done this, or does anyone have any ideas?
Two questions regarding Winston package
How do you change dimensions of an image using savefig?
I have a 256x320 matrix that i use to plot an image using Winston package with the imagesc() command and then when i try to save it using savefig("picture.png","width","height") i get the same 512x512 pixels picture and i can't resize it, no matter how i change values : width, height.
Is it possible to export a FramedPlot chart to an image?
Regards
Mike
To answer the first part, savefig() takes the variable number of positional arguments and named key value pairs, so the right way of calling your function is,
julia>savefig("name.png","width",10,"height",20)
I have a pdf which I would like to use as a template to create a new pdf. The goal is to place an image inside a particular placeholder rectangle in the original pdf. The creation of the original pdf is under my control but the placeholder rectangle/bounds might be anywhere in the pdf. I am thinking of using a dummy image(of same dimensions) as the placeholder rectangle in the original pdf.
The Prawn gem supports placing an image at a given absolute/relative position within a page.
The trouble is that since the rectangle or dummy-image could be anywhere in the original pdf, I don't know what values to use for the following
pdf.image "/path/to/image", :at => [x,y] prawn call
Is there a way to get the coordinates of an image in the original pdf. My primitive understanding tells me that one would have to render the entire pdf to know this. Is that right ? If yes, what would be a good way to render pdf in memory (headless) and get the co-ordinates of various pdf objects(like bounding rectangles, images, etc).
I am not limited by language/runtime here as long as I can trigger it programmatically.
What could be other approaches to this problem ?
Not an answer (e.g. I don't know the Ruby language), but in lieu of any others, and because I can't post a comment yet, here's what I think.
If conditions stated above are true (placeholder and replacement images are exactly same size + same color model e.g. RGB 24 bps) and you control template creation (therefore you can store placeholder inside PDF uncompressed), it can be as quick and dirty as raw replacement in a file treated as byte string. E.g. placeholder filled with red, then you search for pattern (0xFF0000) x W*H and replace it with raw image data. Which, of course, you can get any way you like, e.g.:
convert my_image.jpg RGB:- | ...
If this solution is too dirty or conditions not exact, then parse page content stream for construct like
width 0 0 height x y cm
/name Do
It's not cleanest, either, but for vast number of simple page descriptions x and y are the coordinates you are looking for.
Further, if you control template creation, why don't you store additional information inside pdf as e.g. custom keys in Info dictionary, and then read them back when using the template.