How do you use setRectOfInterest for AVCaptureSession

I'm struggling with how to impliment AVCaptureSession 's setRectOfInterest method.
To make things simple... there's some sample code in the WWDC sample code (2013) called QRchestra.
Right now the scanning of barcodes is for the entire preview area... but lets say I want to limit it to half the screen.
The ReceiveViewController gets the meta data from SessionManager.
Now in RecieveViewController viewDidLoad I can do :
self.sessionManager = [[SessionManager alloc] init];
[self.sessionManager startRunning];
AVCaptureVideoPreviewLayer *previewLayer = [[AVCaptureVideoPreviewLayer alloc] initWithSession:self.sessionManager.captureSession];
CGRect metadataRect = [previewLayer metadataOutputRectOfInterestForRect:CGRectMake(160, 0, 320, 348)];
That should give me the coordinates translated for the frame of refference of the preview screen.
According to WWDC I would apply that to the metadata output :
[metadataOutput setRectOfInterest:metadataRect];
That sould be it - but the issue I am having is finding that metadataOutput object.
It exists in SessionManager but must be private or something as it doesn't appear to be exposed to ReceiveView Controller vis self.SessionManager.
Google has been of no help with setRectOfInterest so I'm coming to you fine people.
Anyone able to shed some light on this for me?

Not really my bag, this, but did you look at the class reference for AVMetadataObject? apparently you never create a metadata object directly but get one by using an AVCaptureMetadataOutput object. As best I can grok this on brief (totally underinformed) inspection, you start with a capture session then use the addOutput method to add an appropriate metadata object. The rectOfInterest property is set on that rather than on the session itself.
If that doesn't help, sorry!

Similar Messages

  • How do you use tools for reporting in oracle?

    Hello,
    I have a question about reporting in oracle pl/sql..., how tools do you use to reporting in oracle?
    ths,

    Hello,
    reporting in "Excel" files is often required. And there are free tools to do so.
    https://xml-spreadsheet.samplecode.oracle.com/ or
    https://exceldocumenttype.samplecode.oracle.com/
    Others can be found at Re: How to save a query result and export it to, say excell?
    Regards
    Marcus

  • How do you use ".onEnterKey" for an edittext box?

    I'm using .onActivate and .onDeactivate to control my edittext box but can not figure out how to use the .onEnterKey. How do I use this so that if I hit the return key the value in the edittext box is set and no longer active?

    I'm using .onActivate and .onDeactivate to control my edittext box but can not figure out how to use the .onEnterKey. How do I use this so that if I hit the return key the value in the edittext box is set and no longer active?

  • How do you use emojicons on a mac?

    quick question- how do you use emojicons (for twitter) on a mac book pro?

    Google, "how do you use emojicons on Twitter?"

  • How can you use the same e-mail address for multiple ipads?

    I have two iPads.. an iPad and an ipad 2.  I registared my new ipad 2 and now my old ipad is will not let me log on and is telling me that my e-mail address is already in use.  how can you use the same e-mail address for multiple ipads?

    And by using the same Apple ID you can also share purchases.  If you have a different Apple ID for each iPhone then you can't share purchases.

  • HT2534 How do you use an iTunes card after you have redeemed it?? I have entered my code for redeem and when I click on purchase song it asks me for a credit card?!

    How do you use your iTunes card after you have redeemed it. I have entered my redeem code and my balance is $20.00 but when I go to buy a song it asks me for my credit card details...?!

    If you set up an Apple ID already and didn't enter credit card details because you were planning on using gift cards only, you probably set up the account incorrectly. If this is the case, you will have to enter the credit card details even if you want to use only gift cards and download free content only. Yoy will not have to use the card, but you can't use the ID without entering the card details now. You may be able to remove the card as well after the card is verified for use by Apple by editing your account details.
    There is a very specific manner in which you have to set up an ID without using a credit card. You can read about it here.
    http://support.apple.com/kb/HT2534
    See this about changing iTunes account information.
    http://support.apple.com/kb/ht1918
    If you decide to create a new ID now, you will new another email address as wel, because the email address that you are currently using will already be associated with the ID that you just set up.
    I am making certain assumptions here and reading between the lines of your post, so if I am guessing incorrectly, post back with more details.

  • HT201209 How do you use a gift card for the billing info

    How do you use a gift card in the billing info

    Itunes verifies your account using credit card info.

  • Can you use wallpapers for the icons on the iphone 3g? If so, How

    Can you use wallpapers for the icons on the iphone 3g? If so, How

    On the Mac to save a picture from a web page <CTRL> click on the picture then choose Save Image As... and save it onto the desktop. Once you have collected all your pictures onto the desktop open iPhoto and Import all the images into an iPhoto Album. Quit iPhoto.
    Open iMovie, then go to the Toolbar along the right side of the iMovie window and click on the camera icon to browse through your iPhoto Library. Find your pictures then drag them into the Project Browser window.

  • How do you use Default Resource Access Information?

    I have some 10g Forms & Reports that I want to use with SSO and they will all be connecting to the database with the same connection info. I know how to configure a Default Resource Access Information, but how do you use this with Forms & Reports?

    Douglas,
    the default Resource Access Infomation should be the connection information right? This is used in conjunction with SSO. You need to configure your F&R applications to delegate authentication to SSO by placing ssoMode=true in the config section of formsweb.cfg.
    The Forms Servlet will connect to OID retrieve the Resource Access Information (descriptor) for a given user and automatically log them into the application.
    Users will need a global identity in OID and SSO must be enabled to use resource access info with F&R
    regards,
    tt

  • How do you use forward and back button on mouse and use "zoom" in web browser.

    Ok so apparently this forum is ruled with an iron fist or something my very honest and truthful problems with these issues seem to have been instantly deleted in my last discussion?
    I'll try this once more.
    1) How do you use the forward and back button on a mouse without having to buy a product like Steer Mouse? There must be a way to do this without having to buy a program given it's such a useful feature that 99% of users need. I don't want to spend hours researching something that should already work. Any advice?
    2) How do you zoom in for web browsers like Chrome without it globally zooming in everything on the monitor (even background applications). I don't want to zoom in background applications. I want to be able to zoom in the web browser and still maintain all the features like the side bar, not just a little magnifying glass type thing.
    I'm currently zooming in with the CTRL-Middle Mouse button, but I can't find a way to use this feature so it's useful to browse the web it seems to not scale the browser correctly but rather is a global zoom. Any solution for this?

    Thanks so much!
    Like I said I am new to Apple products so it's still unclear to me which programs I do or don't need as I'm setting up and configuring all my software and devices.
    The Logitech Control Center appears to work perfectly for what I was trying to do!
    I accidently clicked "This helped me" instead of "This Solved My Question", sorry about that this was a solve!

  • How do i use ibooks for saving my lecture notes / power point slides please?

    Hi, how do I use ibooks for savng / storing my lecture notes on please? (on either a iphone or ipad). Also, can I save powerpoint slides to it too? thanks.

    iBooks can only read two formats -- .epub and pdf.  So you have to convert your lecture notes or powerpoints to one of those.  To do that, check the Save, Export, or Share functions of whatever app you are using to create your notes.

  • I have two users with different music on each itunes and i can only use one library, how do i use both for one iTouch?

    i have two users with different music on each itunes and i can only use one library, how do i use both for one iTouch?

    Chris, I believe this link may have the information you're looking for. Welcome to discussions!
    http://docs.info.apple.com/article.html?artnum=300432

  • How do you use the Multiple Item Information dialog box ???

    How do you use the Multiple Item Information dialog box ???
    Where are the instructions on how the information in the Multiple Item Information dialog box equates to ...
    1. The way iTunes sorts tracks and albums
    2. The reason to select a leading check box
    3. Why there are Option selections (Yes /No) and leading check boxes.
    4. Why some changes remain in the track info, but do not "take effect" in iTunes (Part of a compilation is an example)
    Looked in Help, Support, went to the local Genius bar for an hour, even arrainged a call from apple support ...
    Thanks

    As Christopher says, it's a compilation. Different tracks are by different artists.
    Setting the *Album Artist* field to *Various Artists* and setting *Part of a compilation* to Yes should be all that is required. Depending on your *Group compilations when browsing* setting ( I recommend On ) either should suffice but I suggest doing both.
    Based on your commentary, I selected all the "O Brother" tracks, and checked the boxes for everything line that was blank in the Info and the Sort panes. Only exceptions were the album name and the disc number 1 of 1 and the artwork. I blanked and checked anything else.
    That's not what I meant. When you select multiple tracks, only those values which +are already common+ to all tracks are displayed. Typically these will include Artist, though not with compilation albums, Album Artist, Album, No. of Tracks, Genre plus various sort fields. A blank value may indicate that different tracks have different values or it may be that the value is blank for all tracks. For the drop down values on the Options tab the value shown may not reflect the information in every tag. If values you expect to be common, such as Album Artist or the Album title are not displayed you can simply type these in and click OK. This will often be enough to group the album.
    If you place a checkmark against the blank boxes and apply changes then you will clear those fields so you should only do this if that is the effect you want. Putting a checkmark next to an empty (representing different values) *Track No.* box, for example, will just clear the all the track numbers which is very rarely useful.
    Adding then removing extra text is for a specific problem where despite all common values being identical across the tracks of the album iTunes seems to "remember" that it should see two albums. A typical example would be when an album originally listed as *Album CD1* & *Album CD2* is given disc numbers X of Y and then has the Album name changed to Album. I've seen iTunes merge all but one track into the new album, but insist on listing one remaining track separately, despite both albums having the same title. In this case I've found overtyping the album title again has no effect whereas changing it to AlbumX and then back to Album does what I was trying to achieve in the first place.
    Don't forget that even properly organsied albums may still break up if you don't chose an album-friendly view. Sorting on the track name or track number columns can be useful in some circumstances but in general I revert to Album by Artist when browsing through my library.
    tt2

  • How do you use ReadyHosting's myLittleTools?

    A client I do some work for occasionally, has normally wanted me to add links to various partner websites. These have all been pretty small over the years I’ve done this work for him, like make 5 at most. Well now he’s hit me
    with about 2 dozen partners that he wants a link to. When it gets to this point I think of databases.
    I created a MS SQL Server database on Ready Hosting’s server, associated with my client’s account. (Got his permission before doing so.) Then I created a user for that, so that I could get into it. Ready Hosting uses something
    called “myLIttleTools” for managing and administering one’s SQL Server databases on their servers. So I tried going into it, entering the credentials that I created. But it refuses to allow me to log in. I get the following error message:
    “Error -2147217843
    Login failed for user ‘MyID'.
    Provider=sqloledb;Data Source=ReadyHostingServer;Initial Catalog=ClientDB;User Id=MyID;Password=MyPassword;Connect Timeout=120;”
    (Clearly I’ve changed the credentials here; they’re not what I’ve created.)
    Two days ago I opened a help ticket with them. Still haven’t heard from them.
    So I’m asking here, does anyone have any experience with SQL Server database management on ReadyHosting? How am I supposed to log in when it refuses to accept the credentials for the user I created on it? They want you to use
    this “myLittleTools” thing, but WOW how do you use that when you’re prevented from even getting into the door?
    Rod

    Readyhosting is still around? They were a really good host back at the turn of the century then were bought by a company that proceeded to hire incompetents and became totally unreliable. I'd have thought they folded a decade ago.
    As others said, this is an issue to be resolved through Readyhosting's support personnel. EW is not really deigned for managing database servers. If their connection permits it you can use the MS SQL tools to manage remotely (doubt they allow it though)
    and most people use MS Web Developer Express for their database work on small websites not EW.
    Free Expression Web Tutorials
    For an Expression Web forum without the posting issues try
    expressionwebforum.com

  • How do you use AdobeExportPDF??

    I'm not sure what you have changed with ExportPDF, but have used it in the past and there was always sign in page that popped up after you paid the annual fee. Now it keeps trying to sell me the subscription again. How do you use Export now? You have already charged my bank for the fee and I can go to my account when I sign in and see that I'm supposed to have an active subscription, but there is no place to select the option of exporting a PDF to convert to word. I have called Adobe customer care and guess what, no support available there nor help getting to the right people to help. I see from the discussions on this page that it seems to be a common problem.
    So, how do I use Adobe ExportPDF?
    Is this a scam?
    Why did you make it so difficult to use now?

    Im having the same issue!!! Help

Maybe you are looking for