اذهب إلى المحتوى

Engy Pearl

الأعضاء
  • المساهمات

    4
  • تاريخ الانضمام

  • تاريخ آخر زيارة

آخر الزوار

لوحة آخر الزوار معطلة ولن تظهر للأعضاء

إنجازات Engy Pearl

عضو مبتدئ

عضو مبتدئ (1/3)

4

السمعة بالموقع

  1. أود أن أكتب مصفوفة في جافا Two-dimensional Array، لكن هذه المصفوفة ستأخذ عدد عناصرها من المستخدم ما بين 100،200،500،1000، وشرطها أن تكون عدد الأعمدة يساوي 10 وهو ثابت ولكن عدد الصفوف متغير حسب عدد عناصرها ما بين 10 إذا أدخل المستخدم رقم 100، و20 لو أدخل 200، و50 لو أدخل 500 ، 100 لو أدخل 1000. عناصرها حسب عدد عناصرها لو أدخل المستخدم 100 ستكون مصفوفة 10x10 وعناصرها من ال1 لل100 ، ونستطيع طباعتها بشاكلة 10x10 وكذلك الحال مع ال200: الصفوف =20 والأعمدة 10 وعناصرها من ال1 لل200 .
  2. سألته وأجبته وهذه الصورة تفضل
  3. import cv2 import numpy as np from PIL import Image # Read image. from numpy import resize img = cv2.imread('test2.jpg', cv2.IMREAD_COLOR) # Convert to grayscale. gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # Blur using 3 * 3 kernel. gray_blurred = cv2.blur(gray, (3, 3)) # Apply Hough transform on the blurred image. detected_circles = cv2.HoughCircles(gray_blurred, cv2.HOUGH_GRADIENT, 1, 20, param1 = 50, param2 = 30, minRadius = 10, maxRadius = 40) # Draw circles that are detected. if detected_circles is not None: # Convert the circle parameters a, b and r to integers. detected_circles = np.uint16(np.around(detected_circles)) for pt in detected_circles[0, :]: a, b, r = pt[0], pt[1], pt[2] # Draw the circumference of the circle. cv2.circle(img, (a, b), r, (0, 255, 0), 2) # Draw a small circle (of radius 1) to show the center. cv2.circle(img, (a, b), 1, (0, 0, 255), 1) cv2.imshow("Detected Circle", img) cv2.waitKey(0) الفكرة بال for loop بنخرج اخر كودين خارج الloop وفقط من البداية بتم تحديد كل النقاط
  4. يظهر لي الخطأ 'pip' is not recognized as an internal or external command, operable program or batch file.
×
×
  • أضف...