I use the function DrawCVImage() to put the video on winform CLR. I worked for HSV image, normal image except the thresholded image.
the thresholded screen separated into 3 sections ##
picture number3: I used imshow();
picture number4 : i used DrawCVImage();
thank you,
Related
In mobile view mapbox renders black image instead of raster image. I suspect this is because of the size of image(3.9 MB), also this is happening mostly on chrome browser for mobile. Please help me find the potential issue here?
This sounds as if you could be running into the No-Data issue, when rendering transparency.
The black background that appears is the part of the raster image that does not contain any data. Generally a raster image is a rectangular grid of pixels. When you are working with data that is not rectangular, there are pixels within the grid that don't contain any data. These pixels are expressed as NoData values and represent the absence of data. GeoTIFFs that are uploaded to Mapbox Studio are displayed as JPEG to save space and make maps load quickly. Since JPEG cannot display transparency, NoData values appear black.
Please see this documentation on how to resolve this:
https://docs.mapbox.com/help/troubleshooting/raster-transparency-issues/#why-black-backgrounds-appear
I would happily provide a screenshot of this, however the problem is the captured image, is much larger than my actual desktop.
I am completely frustrated with this as I have tried using BitBlt with the desktop hdc AND the new "Graphics" commands.
My actual desktop resolution is 1920x1080 - 1080p .
BitBlt and "Graphics" both return that my resolution is 1536x864 # 96 DPI.
A form (WinForm), Maximized, borderless, and irrelevant of scaling mode the form is set to, also shows 1536x864 # 96 DPI.
Now the image that is captured, is like it is being done from 1920x1080, but clipping the region 1536x864 as the screenshot.
If I do PrintScreen directly using Prtscn button, I get the entire image, but still it is about 1.5-2x larger than what I actually see.
What I am looking for -- is a resolution for how I can take a picture of what is on my screen in the scale/dpi/whatever is going on here that it visually looks like. I have written a screen capture program, and using a few different examples for the RubberBand form (overlay form to select a region of the screen by drawing a box), and as you can imagine, this scaling crap is causing those box captures to be offset, and the contents are zoomed.
This is very annoying -- even to explain, however I am positive that most of you are familiar with the terms I use, and also know what to expect from taking a screenshot, so my explanation above should be pretty clear as to what my problem is.
Example/Consideration
Imagine, taking a picture of a window that is 300x300, and getting the top left 150x150 of that zoomed to 300x300 completely skipping the remainder of the window. Resulting image is still 300x300, but it's not what you selected.
Now imagine, you grab a picture of your screen by the only dimensions you can get programmatically, and then put the image into a picturebox. Even though both your screen and the picturebox claim to be the same dimensions and dpi, the image in the picturebox requires scrolling even if the picturebox is maximized to fullscreen on a borderless with no borders / etc. -- again, the picture is zoomed, but how is it still reporting that it's the same size as the form XD (comparing Graphics or BitBlt dimensions with the actual form. also tried comparing picturebox contents, and still same effect)
This, is EXACTLY what the effect is that is happening. When I try to capture a region or segment of the screen. I am not sure why windows api/crl is lying about this seemingly trivial stuff, however there must be a way to accurately obtain screenshots/capture regions without this faux zoom effect -- across all resolutions.
Thank you Hans Passant for pointing me in the right direction.
To add "true" dpi scaling support to a winforms application, you can make it so by adding the following block to your manifest :
Project > Add New Item > Visual C# Items > Application Manifest File
One the file has been added, open it up and look for a line like
</asmv1:assembly>
Whatever the "asmv" number is, (in the example above it is 1), use that to format the code:
<asmv1:application>
<asmv1:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv1:windowsSettings>
</asmv1:application>
Paste the above code (changing the asmv1 to whatever version the manifest is), just above the final closing line for the ""
Also, make sure your forms are set to AutoScale to dpi (and all sub-elements).
I have an image( mechanical part of machine ) in my form in which I have to put some measurement like width and height, show arrows for inlet and outlet on image and display name near by each component. How do I proceed for this ?
Note : Width and height come from user as input, so all these dimension depends on user. Basically user will try to design a feasible model based on some calculations. These parameters need to be displayed on image.
If I understand the question correctly you are trying to draw on an image.
For that just create an Image using Image.createImage(width, height, ARGB_COLOR) that would generate a "mutable image" which means you can draw on it by invoking getGraphics() on the image and using the graphics to draw whatever you want (including other images). You can then save the image to a file using the ImageIO class.
I
My requirement is something like attached image.
I am designing an File editor with more options like language , copy ,paste and save. For that i tried adding icon image to menu strip. It worked but i have limitations on size adjustment , clarity all those things.
Could anyone suggest me any option/control to achieve similar to attached image.
Thanks
You can look at 2 approaches:
Use Gallery in Ribbon Control;
Shrink an image to 32 X 32 or 16 X 16 and you will get a reasonable looking icon. You can try this site to shrink you image resources.
I am using Telerik Rad Chart in my WPF application to plot some graph.
The problem is when there is no data the chart shows a blurred black image.
Is there any way to get around so that the graph does not show this image when the data is not there.
Or i will be happy if there is some other thing that we can do.
Thanks.
put this below code in .cs(code behind page)
chartname.PlotArea.EmptySeriesMessage.TextBlock.Text = "Data is not available";
this avoid the image and if there is no data it will display the message "data is not available".