Wikipedia:Reference desk/Archives/Computing/2016 June 14
Computing desk | ||
---|---|---|
< June 13 | << May | June | Jul >> | June 15 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
June 14
editDigital photo with varying focus
editThis generally isn't a high-quality photo; I took it while driving at comparatively low speed, and (as with most of my images) I had the camera on auto mode, not manual. I'm confused by the inconsistent focus: the center of the image is properly focused while the building's wings aren't (as is expected for such an image), but areas of the right wing are substantially blurrier than areas of the left wing that are no farther from the physical camera and no farther from the center of the image. See the two image notes I've added. Could someone help me understand why the focus is varying? Nyttend (talk) 02:03, 14 June 2016 (UTC)
- A digital camera like that typically used in a phone doesn't take a photo in a literal "instant", it takes some fraction of a second to capture the image and it does so by scanning the field of view. This can lead to some strange effects, as this photo of a propeller illustrates. Also, after just a cursory examination, it actually appears to me that the car on front of the building is the most "in focus" thing, your camera might have focused to that, in which case I don't really see much inconsistency, the right wing IS the object farthest behind the car, so it's the most out of focus, the left wing is not that far behind so it appears less out of focus. Vespine (talk) 04:06, 14 June 2016 (UTC)
- The image was taken with a Nikon D3200, according to the EXIF data. That's a DSLR with a shutter, so I don't think it's a scanning artifact. -- BenRG (talk) 07:39, 14 June 2016 (UTC)
- DSLRs are not rolling shutter effect–proof... --CiaPan (talk) 08:09, 14 June 2016 (UTC)
- You're right. I only meant that it can't be a CMOS scanning artifact, because the sensor isn't scanned until after the shutter is closed. But I don't think this can be related to the mechanical shutter either, because the D3200's shutter moves vertically ([1]). -- BenRG (talk) 21:09, 14 June 2016 (UTC)
- DSLRs are not rolling shutter effect–proof... --CiaPan (talk) 08:09, 14 June 2016 (UTC)
- The image was taken with a Nikon D3200, according to the EXIF data. That's a DSLR with a shutter, so I don't think it's a scanning artifact. -- BenRG (talk) 07:39, 14 June 2016 (UTC)
- Looks to me more like jpeg compression artifacts than out of focus. 91.155.193.199 (talk) 05:33, 14 June 2016 (UTC)
- It's definitely blur, not JPEG artifacts. -- BenRG (talk) 07:39, 14 June 2016 (UTC)
- Everything is blurred on the right, even the grass in the foreground. Also, the blurring seems to be linear, not circular (look at the white handicapped parking sign). So this is probably some sort of motion blur, not focus blur. -- BenRG (talk) 07:39, 14 June 2016 (UTC)
- From the distance this image was shot from, 'landscape' auto-mode would have been better. The aperture would have shut down more, brining more of the background into focus. On a bright day like this, the ISO could have been increased to 200 without loss of quality. Some say that wide angle (in this case 42 mm) increases the depth-of-field - rubbish. Double up on ISO to keep the faster shutter speed, (since you where sooting it from a moving vehicle) and use landscape to ingress depth-of-field.. Auto-modes are useful when one only has a moment to point and shoot but they can't do everything for you. Landscape mode will (on a Nikon) do a good job of averaging the exposure too over the whole scene as well. The blur to the right and left is just down to the wide-angle and too large an aperture. Hope this helps Digital_camera_modes#Automatic_modes.Aspro (talk) 16:48, 14 June 2016 (UTC)
- I don't think depth of field is the problem here. The picture was taken roughly from here. Here's how it looks in Street View. The blurred windows on the right are farther from the camera, but only by ~10–20%. The grass on the left is much closer to the camera and would be much blurrier than the windows if it was a DOF problem. Also, as I wrote above, the blurring appears to be linear, not circular.
- If it's a motion blur (camera shake) problem, then of course what you need is a faster shutter speed, possibly combined with a larger aperture and/or higher ISO. -- BenRG (talk) 21:09, 14 June 2016 (UTC)
- The google street view cameras use lenses with a deep-field-of-view so that everything is in focus. Thus, it is unfair to use their images as a comparison. Look at the sky above- the out of focus is circular. NO - you do not want a lager aperture either -no way- that's back to front. This the problem one can get when using Auto with wide angle lenses. The camera was only doing what it was programmed to do, so one can't fault the camera for that. Selecting landscape or if one has enough time, manually select shutter speed, ISO, aperture, hyper focal, to create a better image. So in answer to the OP question. In future become proficient at instinctively switching quickly to landscape -without having to think about it. Likewise, use the camera built-in facilities for exposure bracketing. That is the whole point of spending money on a auto camera.--Aspro (talk) 22:15, 18 June 2016 (UTC)
Selenium Webdriver
editI am automating a form in which there is unique id field that generates ids randomly through regular expression. I need that random value to be captured and stored in the excel sheet for my own database so that I can perform edit and search on the same data further. Here I have given the code that is generating the ids
public class Regular {
final static String ALPHA_NUMERIC_STRING = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz 0123456789!@#$%^&*()_+-=<>?:\"{}|,./;'[]\'";
public static String randomAlphaNumeric(int count)
{
StringBuilder builder = new StringBuilder();
while (count-- != 0) {
int character = (int)(Math.random()*ALPHA_NUMERIC_STRING.length());
builder.append(ALPHA_NUMERIC_STRING.charAt(character));
}
return builder.toString();
}
}
It gets to the unique id field through the following code:
enterTextField(UniqueCode,5,"Unique Code", Regular.randomAlphaNumeric(25));
How do I get this in my sheet. I have exhausted my limited knowledge of selenium and java.121.243.112.118 (talk) 04:54, 14 June 2016 (UTC)
Selenium Auto Focus
editHow can I write a test case that checks if an element has the cursor focus or not in whenever a form is opened for the first time in selenium using java?
What i have been doing is that using
name.equals(driver.switchTo().activeElement()
and returning a boolean value.
but its not working.Any help....121.243.112.118 (talk) 06:30, 14 June 2016 (UTC)
I am sorry I had to edit this. I am new to this. Anyway did you try .IsDisplayed by Boolean value? if it's true you'll know
What is this...(electric component in digital watch)
editCan anyone please identify the little black thing. [2]From touch seems to be made of ferrite, you know the stuff radio coils etc. are made of. It's identical twin was destroyed during accidental mishandling while trying to insert a new battery and is thus totally missing. Jon Ascton (talk) 08:26, 14 June 2016 (UTC)
- (Sorry I can't help but I want to thank you for taking the time to ask the question carefully- that image is packed with info! I've also added a bit to your header for clarity.) SemanticMantis (talk) 13:28, 14 June 2016 (UTC)
- Thanks SemanticMantis.
- And this model of Timex® was high on buyers list for a perfect backlight, what Timex people call Indiglo™, their zealously well-guarded patent. Might be (component in question) has something to do with it... Jon Ascton (talk) 15:06, 14 June 2016 (UTC)
- Looks like a small ferrite cored inductor to me.--178.104.157.88 (talk) 23:19, 14 June 2016 (UTC)
- It may be, in which case may be part of the boost converter circuitry to generate a high enough voltage for the Indiglo electroluminescence display. But it may also be a piezoelectric sounder (the thing that beeps); usually in watches this is a flat element on the watch back which looks like this, but it's possibly (perhaps due to the type of watch) that they'd use a packaged version like this, where the "cap" on the top is an element used to conduct the sound through to the backplate (which is very often used as a kind of soundboard. But yes, I'd probably go with inductor too. -- Finlay McWalter··–·Talk 11:53, 15 June 2016 (UTC)
On-line Surveys
editI recall from my past: Sometimes while on-line, certain websites demand you to fill out a survey in order to receive something or go to the next page… What should I be worried about before I fill in such [random] surveys? -- Apostle (talk) 18:56, 14 June 2016 (UTC)
- Relevant links: Google Consumer Surveys, Survata. -- ToE 20:41, 14 June 2016 (UTC)
- Wasting your time, ending up on a sucker list, providing your enemies (and parasites in general) with accurate information about you and giving them the false impression that using those surveys is a good idea et cetera. When I cannot avoid filling something in I fill them with nonsense, but 99,99% of the cases I leave in disgust. (((The Quixotic Potato))) (talk) 17:51, 15 June 2016 (UTC)
- Okay noted. Thanks peeps. -- Apostle (talk) 18:35, 15 June 2016 (UTC)