श्रेणियाँ, पैकेज और रिपॉज़िटरी खोजें

camera_deep_ar कवर
पैकेज विवरणv0.0.2+3

camera_deep_ar

कैमरा वीडियो और फोटो एग्जामिनेशन रिकॉर्डिंग के लिए एक फ्लटर प्लगइन।

AndroidiOS
30-दिन डाउनलोड
13
लाइक
95
Pub अंक
120

पैकेज इंस्टॉल करें

flutter pub add camera_deep_ar

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

camera_deep_ar एक Flutter प्लगइन है जो DeepAR SDK का उपयोग करके आवधारित वास्तविकता (AR) वीडियो और फोटो रिकॉर्डिंग संभव बनाता है। यह Android और iOS प्लेटफॉर्म के साथ निरंतर रूप से एकीकृत होता है, जिससे विकासकर्ता कैमरा स्ट्रीम में चेहरा फ़िल्टर, एनिमेशन और वर्चुअल ऑब्जेक्ट्स जैसे रियल-टाइम AR प्रभाव जोड़ सकते हैं। प्लगइन AR के कार्यान्वयन को सरल बनाता है और AR ओवरले के साथ मीडिया को कैप्चर और प्रोसेस करने के लिए एक सीधा API प्रदान करता है। सोशल ऐप्स, गेमिंग और इंटरैक्टिव अनुभवों के लिए आदर्श, यह उच्च गुणवत्ता वाले आउटपुट और चिकनी प्रदर्शन का समर्थन करता है। DeepAR इंजन पर बनाया गया, यह उपकरणों के बीच विश्वसनीय चेहरा ट्रैकिंग और प्रभाव रेंडरिंग सुनिश्चित करता है।

उपयोग

  • सोशल मीडिया फिल्टर
  • इंटरैक्टिव गेमिंग
  • वर्चुअल ट्राई-ऑन्स
  • लाइव एआर स्ट्रीमिंग
  • फोटो एडिटिंग ऐप्स

मुख्य विशेषताएँ

  • रियल-टाइम AR प्रभाव
  • चेहरा और वस्तु ट्रैकिंग
  • उच्च गुणवत्ता वीडियो रिकॉर्डिंग
  • क्रॉस-प्लेटफॉर्म समर्थन (Android और iOS)
  • Flutter के साथ आसान एकीकरण

इनके लिए उपयुक्त

  • AR-सक्षम ऐप बनाने वाले विकासकर्ता
  • सोशल मीडिया प्लेटफॉर्म
  • वर्चुअल ट्राई-ऑन के साथ ई-कॉमर्स
  • गेमिफिकेशन विशेषताएं

विचार योग्य बातें

  • DeepAR SDK लाइसेंसिंग की आवश्यकता है
  • उच्च उपकरण संसाधन उपयोग हो सकता है
  • DeepAR विशेषज्ञता के बिना सीमित कस्टमाइज़ेशन
  • बाह्य SDK अपडेट पर निर्भर

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

camera_deep_ar

A new Flutter plugin for Camera video and Photo Augmented reality recording. This plug-in requires Android SDK 19+ and iOS 10+

Getting Started

Please follow the example on the dev channel https://github.com/mtellect/CameraDeepAR/tree/dev as the dev channel has the recent code updates

Get your ApiKeys from DeepAr a link

DeepAr Camera Demo

  1. Simply follow the example main.dart. More documentations to come in as time permits

import 'package:camera_deep_ar/camera_deep_ar.dart';

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';
  CameraDeepArController cameraDeepArController;
  int currentPage = 0;
  final vp = PageController(viewportFraction: .24);
  Effects currentEffect = Effects.none;
  Filters currentFilter = Filters.none;
  Masks currentMask = Masks.none;
  bool isRecording = false;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.black,
        appBar: AppBar(
          title: const Text('DeepAR Camera Example'),
        ),
        body: Stack(
          children: [
            CameraDeepAr(
                onCameraReady: (isReady) {
                  _platformVersion = "Camera status $isReady";
                  setState(() {});
                },
                onImageCaptured: (path) {
                  _platformVersion = "Image Taken @ $path";
                  setState(() {});
                },
                onVideoRecorded: (path) {
                  _platformVersion = "Video Recorded @ $path";
                  isRecording = false;
                  setState(() {});
                },
                androidLicenceKey:
                    "3b58c448bd650192e7c53d965cfe5dc1c341d2568b663a3962b7517c4ac6eeed0ba1fb2afe491a4b",
                iosLicenceKey:
                    "53618212114fc16bbd7499c0c04c2ca11a4eed188dc20ed62a7f7eec02b41cb34d638e72945a6bf6",
                cameraDeepArCallback: (c) async {
                  cameraDeepArController = c;
                  setState(() {});
                }),
            Align(
              alignment: Alignment.bottomCenter,
              child: Container(
                padding: EdgeInsets.all(20),
                //height: 250,
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  mainAxisAlignment: MainAxisAlignment.end,
                  children: [
                    Text(
                      'Response >>> : $_platformVersion\n',
                      textAlign: TextAlign.center,
                      style: TextStyle(fontSize: 14, color: Colors.white),
                    ),
                    SizedBox(
                      height: 20,
                    ),
                    Row(
                      children: [
                        Expanded(
                          child: FlatButton(
                            onPressed: () {
                              if (null == cameraDeepArController) return;
                              if (isRecording) return;
                              cameraDeepArController.snapPhoto();
                            },
                            child: Icon(Icons.camera_enhance_outlined),
                            color: Colors.white,
                            padding: EdgeInsets.all(15),
                          ),
                        ),
                        if (isRecording)
                          Expanded(
                            child: FlatButton(
                              onPressed: () {
                                if (null == cameraDeepArController) return;
                                cameraDeepArController.stopVideoRecording();
                                isRecording = false;
                                setState(() {});
                              },
                              child: Icon(Icons.videocam_off),
                              color: Colors.red,
                              padding: EdgeInsets.all(15),
                            ),
                          )
                        else
                          Expanded(
                            child: FlatButton(
                              onPressed: () {
                                if (null == cameraDeepArController) return;
                                cameraDeepArController.startVideoRecording();
                                isRecording = true;
                                setState(() {});
                              },
                              child: Icon(Icons.videocam),
                              color: Colors.green,
                              padding: EdgeInsets.all(15),
                            ),
                          ),
                      ],
                    ),
                    SingleChildScrollView(
                      padding: EdgeInsets.all(15),
                      scrollDirection: Axis.horizontal,
                      child: Row(
                        children: List.generate(Masks.values.length, (p) {
                          bool active = currentPage == p;
                          return GestureDetector(
                            onTap: () {
                              currentPage = p;
                              cameraDeepArController.changeMask(p);
                              setState(() {});
                            },
                            child: Container(
                                margin: EdgeInsets.all(5),
                                padding: EdgeInsets.all(12),
                                width: active ? 100 : 80,
                                height: active ? 100 : 80,
                                alignment: Alignment.center,
                                decoration: BoxDecoration(
                                    color:
                                        active ? Colors.orange : Colors.white,
                                    shape: BoxShape.circle),
                                child: Text(
                                  "$p",
                                  textAlign: TextAlign.center,
                                  style: TextStyle(
                                      fontSize: active ? 16 : 14,
                                      color: Colors.black),
                                )),
                          );
                        }),
                      ),
                    )
                  ],
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}

  1. To snap a photo

 cameraDeepArController.snapPhoto();

  1. To record a video

 cameraDeepArController.startVideoRecording();

  1. To stop video recording

cameraDeepArController.stopVideoRecording();

  1. To stop video recording

cameraDeepArController.stopVideoRecording();

  1. To change a mask

cameraDeepArController.changeMask(p);

More to come....

Android

You can use Permission_handler, a permissions plugin for Flutter. Require and add the following permissions in your manifest:

Add this to the proguard-rules.pro


-keepclassmembers class ai.deepar.ar.DeepAR { *; }

for release mode modify and add to your BuildType in your build.gradle

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    <uses-permission android:name="android.permission.FLASHLIGHT" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera.front" />
    <uses-feature android:name="android.hardware.microphone" />
    <uses-feature android:name="android.hardware.camera2" />
    <uses-feature
        android:name="android.hardware.camera.autofocus"
        android:required="true" />
    <uses-feature android:name="android.hardware.camera.flash" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />

iOS

You only need add the permission message on the Info.plist


    <key>NSCameraUsageDescription</key>
    <string>Allows you to capture your best moment</string>
	<key>io.flutter.embedded_views_preview</key>
	<true/>
    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>Allows you to capture your best moment</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>Needs access to your mic to help your record voice notes on chat/message conversations</string>

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 3 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।